how to get id(function) for each function in stack?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Jan 6 19:54:43 EST 2012
On Fri, 06 Jan 2012 10:02:28 -0800, dmitrey wrote:
> hi all,
> how to get id(func) for each func in stack? (I mean memory address, to
> compare it with id(some known funcs)) Thank you in advance, D.
id() does not return a memory address, except perhaps by accident. It
returns a ID number. In Jython, and I think IronPython, id() returns a
sequential number for each object created. The first object created by
the Jython virtual machine gets ID 1, the second gets ID 2, and so on.
--
Steven
More information about the Python-list
mailing list