[Python-ideas] Access to function objects
ben+python at benfinney.id.au
Tue Aug 9 03:36:01 CEST 2011
Guido van Rossum <guido at python.org> writes:
> AFAIK there is no fool-proof way to peel back a decorator; decorators
> aren't required to have any specific implementation.
> If the use case was important it would reopen the question of always
> making this value available as a frame attribute. But I'm not sure why
> the line number indicated by the code object (which *is* accessible)
> is insufficient.
Which code object, though? If we can't get at the innermost function
(which is the code location we're interested in) handling the URL, how
will we get its line number?
\ “I bought some batteries, but they weren't included; so I had |
`\ to buy them again.” —Steven Wright |
More information about the Python-ideas