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 Rosuav, docs@python, georg.brandl, gvanrossum, terry.reedy
Date 2016-03-18.20:05:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458331504.67.0.877826787804.issue26576@psf.upfronthosting.co.za>
In-reply-to
Content
Guido, the discrepancy between the decorator doc's 'equivalent code' and actual, optimized, behavior with regard to skipping an intermediate binding of the function to the name came up soon after decorators were added.  I cannot find the issue, but as I remember, you said at the time that the doc's 'equivalent' code was good enough, and perhaps that you did not want to force the optimization on other implementations (not sure of this latter).

This issue has come up often enough on Python list and SO that many think that the actual behavior should be documented.  But should it be documented as a guaranteed language feature or as just an optional optimization?
History
Date User Action Args
2016-03-18 20:05:04terry.reedysetrecipients: + terry.reedy, gvanrossum, georg.brandl, docs@python, Rosuav
2016-03-18 20:05:04terry.reedysetmessageid: <1458331504.67.0.877826787804.issue26576@psf.upfronthosting.co.za>
2016-03-18 20:05:04terry.reedylinkissue26576 messages
2016-03-18 20:05:04terry.reedycreate