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 josh.r
Recipients josh.r, the.mulhern
Date 2014-06-17.19:23:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403033004.74.0.483288544927.issue21794@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think you understand how wrapping works. At the time you're enumerating the stack, the wrapped function has not actually been called. Only the wrapper has been called. If the stack included "junk" when junk had not yet been executed, the stack would be a lie.

From the interpreter's point of view, it doesn't even know that wrapping is in play, aside from the chain of __wrapped__ values attached to the wrapper by functools.wraps (as a convenience). Until you actually call the wrapped function, it's possible you could change your mind and call some other function instead; Python won't stop you, and Python can't tell the difference before the call has been made.
History
Date User Action Args
2014-06-17 19:23:24josh.rsetrecipients: + josh.r, the.mulhern
2014-06-17 19:23:24josh.rsetmessageid: <1403033004.74.0.483288544927.issue21794@psf.upfronthosting.co.za>
2014-06-17 19:23:24josh.rlinkissue21794 messages
2014-06-17 19:23:24josh.rcreate