Re: Python Descriptor as Instance Attribute

2012-01-31 Thread Hua Yanghao
Thanks Ian for the explanation. Please see my comments below: The behavior is by design.  First, keeping object behavior in the class definition simplifies the implementation and also makes instance checks more meaningful.  To borrow your Register example, if the M descriptor is defined by

Python Descriptor as Instance Attribute

2012-01-18 Thread Hua Yanghao
such behavior is not a default in python. Or, is there a better design pattern here? Thanks Best Regards, Hua Yanghao -- http://mail.python.org/mailman/listinfo/python-list