direct initialization of class attributes vs. declarations w/in __init__

digitalorganics at gmail.com digitalorganics at gmail.com
Sun Jun 11 11:58:30 EDT 2006


What's the difference between initializing class variables within the
class definition directly versus initializing them within the class's
__init__ method? Is there a reason, perhaps in certain situations, to
choose one over the other?

Thank you.




More information about the Python-list mailing list