What is a reliable way to get the
the property object for an instance attribute?
(Or more generally, to get the descriptor
controlling an attribute?)

If class ``A`` defines the property ``x`` and ``a``
in an instance of ``A``, then you can just use
``type(a).__dict__['x']`` to get the property object.
But this will not work if the property is inherited.

Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to