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 terry.reedy
Recipients Claudiu.Popa, belopolsky, christian.heimes, ethan.furman, ionelmc, jedwards, llllllllll, terry.reedy
Date 2015-04-18.00:11:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429315870.19.0.102299262278.issue23990@psf.upfronthosting.co.za>
In-reply-to
Content
__call__ is a reserved name defined to be an instance method.  I view wrapping *any* reserved-name instance method with @property to be a bug in that it redefines the name as a data attribute implemented with a 'hidden' get method.  A function wrapped with @staticmethod or @classmethod is also not an instance method.

The doc for callable says " If this returns true, it is still possible that a call fails,"  In your example, calling a() fails with AttributeError, with or without the @property decoration.  Either way it does not contradict the doc.

The doc also says "but if it is false, calling object will never succeed."  So if you can define an object f such that callable(f) == False and print(f()) prints something, that would show a bug (and be a test case).  Failing that, this is appears to be a feature request, not a bug fix.
History
Date User Action Args
2015-04-18 00:11:10terry.reedysetrecipients: + terry.reedy, belopolsky, christian.heimes, ionelmc, Claudiu.Popa, ethan.furman, llllllllll, jedwards
2015-04-18 00:11:10terry.reedysetmessageid: <1429315870.19.0.102299262278.issue23990@psf.upfronthosting.co.za>
2015-04-18 00:11:10terry.reedylinkissue23990 messages
2015-04-18 00:11:09terry.reedycreate