Re: how to get id(function) for each function in stack?

2012-01-07 Thread Robert Kern
On 1/7/12 12:17 AM, Lie Ryan wrote: On 01/07/2012 06:50 AM, Ian Kelly wrote: On Fri, Jan 6, 2012 at 12:29 PM, dmitrey wrote: Python build-in function sum() has no attribute func_code, what should I do in the case? Built-in functions and C extension functions have no code objects, and for that

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Steven D'Aprano
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 Jyt

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Lie Ryan
On 01/07/2012 06:50 AM, Ian Kelly wrote: On Fri, Jan 6, 2012 at 12:29 PM, dmitrey wrote: Python build-in function sum() has no attribute func_code, what should I do in the case? Built-in functions and C extension functions have no code objects, and for that reason they also do not exist in th

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Ian Kelly
On Fri, Jan 6, 2012 at 12:56 PM, Dave Angel wrote: > On 01/06/2012 02:29 PM, dmitrey wrote: >> >> On Jan 6, 8:28 pm, Ian Kelly  wrote: >>> >>> On Fri, Jan 6, 2012 at 11:02 AM, dmitrey  wrote: hi all, how to get id(func) for each func in stack? (I mean memory address, to compare

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Dave Angel
On 01/06/2012 02:29 PM, dmitrey wrote: On Jan 6, 8:28 pm, Ian Kelly wrote: On Fri, Jan 6, 2012 at 11:02 AM, 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. The answer hasn't changed s

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Ian Kelly
On Fri, Jan 6, 2012 at 12:29 PM, dmitrey wrote: > Python build-in function sum() has no attribute func_code, what should > I do in the case? Built-in functions and C extension functions have no code objects, and for that reason they also do not exist in the stack. There is no way to find sum() i

Re: how to get id(function) for each function in stack?

2012-01-06 Thread dmitrey
On Jan 6, 8:28 pm, Ian Kelly wrote: > On Fri, Jan 6, 2012 at 11:02 AM, 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. > > The answer hasn't changed since your last thread

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Ian Kelly
On Fri, Jan 6, 2012 at 11:02 AM, 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. The answer hasn't changed since your last thread about this. The stack contains code objects, not

how to get id(function) for each function in stack?

2012-01-06 Thread dmitrey
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. -- http://mail.python.org/mailman/listinfo/python-list