re:c++ÈçºÎÏòpythonµÄœÅ±ŸŽ«µÝÒ»žöÀà×÷Ϊ²ÎÊý¡£

2005-07-18 Thread Hua
Hi, you should write in English, otherwise there is nobody understand your question. ` -- http://mail.python.org/mailman/listinfo/python-list

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

root[:]=[root,root]

2011-12-16 Thread YAN HUA
Hi,all. Could anybody tell how this code works? >>> root = [None, None] >>> root[:] = [root, root] >>> root [[...], [...]] >>> root[0] [[...], [...]] >>> root[0][0][1][1][0][0][0][1][1] [[...], [...]] >>> Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Python Descriptor as Instance Attribute

2012-01-18 Thread Hua Yanghao
ike a charm and each instance of "Register" now invoke the descriptors properly. I just do not understand, why 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