On Apr 7, 2:19 pm, "Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote: > 2008/4/7, Floris Bruynooghe <[EMAIL PROTECTED]>: > > > > > Have been grepping all over the place and failed to find it. I found > > the test module for them, but that doesn't get me very far... > > I think you should take a look at 'descrobject.c' file in 'Objects' directory.
Thanks, I found it! So after some looking around here was my implementation: class myproperty(property): def setter(self, func): self.fset = func But that doesn't work since fset is a read only attribute (and all of this is implemented in C). So I've settled with the (nearly) original proposal from Guido on python-dev: def propset(prop): assert isinstance(prop, property) @functools.wraps def helper(func): return property(prop.fget, func, prop.fdel, prop.__doc__) return helper The downside of this is that upgrade from 2.5 to 2.6 will require code changes, I was trying to minimise those to just removing an import statement. Regards Floris -- http://mail.python.org/mailman/listinfo/python-list