Implicit self in Python -
in python, reduce clutter, there way "declare" members/methods of class "self" or workaround.
class range: #range_start # declare self #range_end # declare self def __init__(self,my_range_start,my_range_end): range_start = my_range_start range_end = my_range_end def print_range(self): print ("%x %x" % (range_start,range_end))
there isn't straightforward way this. also, if did, you'd violate rather deep set python conventions , code become harder read other python programmers. high cost, in opinion, reduce visual clutter.
Comments
Post a Comment