text_combined: benjamin peterson mfphjffbrfsvyrjfgmailcom fri apr 4 2008 249 zaur shibzoukhov wrote suggest context manager property definingredefining prototype illustrative example import sys null object _property property class property_property def __init__self args kw _property__init__self args kw self__enter__ self__enter self__exit__ self__exit classmethod def __enter__self return null classmethod def __exit__self type value tb tb none frame sys_getframe1 self__exithandlerself framef_locals def __enterself return null def __exitself type value tb tb none frame sys_getframe1 self__exithandlerself framef_locals staticmethod def __exithandlerself _locals propname _ propname stridself key value _localsitems value null propname key propname keycapitalize break typeself typeproperty getfunc _localspopget none setfunc _localspopset none delfunc _localspopdelete none doc _localspopdoc none else getfunc _localspopget none selffget setfunc _localspopset none selffset delfunc _localspopdelete none selffdel doc _localspopdoc none self__doc__ getfunc funcname _getpropname getfunc__name__ funcname _localsfuncname getfunc setfunc funcname _setpropname setfunc__name__ funcname _localsfuncname setfunc delfunc funcname _delpropname delfunc__name__ funcname _localsfuncname delfunc prop propertygetfunc setfunc delfunc prop__doc__ doc _localspropname prop def testpropertymaker class aaa _v 1 property v doc example making property statement def getself return self_v def setself v self_v v class bbbaaa aaav v doc example modified property def getself return self_v aaaa av 10 printav printaaav__doc__ bbbb bv 100 printbv printbbbv__doc__ code also attachment suitable contextlibpy dont really see bettereasier class aaa def get_x pass def set_x pass x propertyget_x set_x none x property _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000musiccomposition40gmailcom cheers benjamin peterson thu 07 aug 2008 023448 0500 python3000 new member contextlib