How to override the doc of an object instance.

David Huard david.huard at gmail.com
Wed Jun 21 12:04:15 EDT 2006


Paul, 

Although your solution works for the class itself, it doesn't for class
attributes, since they point to built-ins whose attributes are read-only. 

>>> w.x.__doc__ = widget.x.__doc__
AttributeError: 'int' object attribute '__doc__' is read-only

Would the solution be to build a new type and change its dict ?
 
David




More information about the Python-list mailing list