This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients eric.araujo, hardkrash, ncoghlan, rhettinger
Date 2013-12-22.08:35:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387701342.41.0.387404075318.issue20009@psf.upfronthosting.co.za>
In-reply-to
Content
> When using the @property decorator the wrapped functions 
> are not exposed for source introspection. 
> (At least I can't see how they are.)

The underlying functions are already exposed as the "fget", "fset", and "fdel" attributes of property objects.

Here is an example of how to access the source:

class Dog:
    @property
    def age(self):
        return 42

if __name__ == '__main__':
    import inspect
    age_property = Dog.__dict__['age']
    lines, size = inspect.getsourcelines(age_property.fget)
    print(''.join(lines))
History
Date User Action Args
2013-12-22 08:35:42rhettingersetrecipients: + rhettinger, ncoghlan, eric.araujo, hardkrash
2013-12-22 08:35:42rhettingersetmessageid: <1387701342.41.0.387404075318.issue20009@psf.upfronthosting.co.za>
2013-12-22 08:35:42rhettingerlinkissue20009 messages
2013-12-22 08:35:41rhettingercreate