[Python-ideas] Access to function objects
ben+python at benfinney.id.au
Tue Aug 9 06:01:31 CEST 2011
Nick Coghlan <ncoghlan at gmail.com> writes:
> On Tue, Aug 9, 2011 at 11:36 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> > 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?
> In general, you can't […]
Thanks. I don't know what Guido was referring to, then, with:
> But I'm not sure why the line number indicated by the code object
> (which *is* accessible) is insufficient.
Since the inner function's code object isn't reliably available, it's
insufficient for reliably getting to the undecorated function which
handles a specific Django URL.
\ “… whoever claims any right that he is unwilling to accord to |
`\ his fellow-men is dishonest and infamous.” —Robert G. |
_o__) Ingersoll, _The Liberty of Man, Woman and Child_, 1877 |
More information about the Python-ideas