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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -