"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>From what I remember when I looked at the source: stack frames execute
code objects, not functions. They don't know what function has
spawned them, only what code object they are executing. In fact when
one thinks o
On Mar 24, 2:01 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
[...]
>
> Yes, but what I'm asking is why the code objects have a co_name
> attribute. And even if there's a good reason for code objects to have a
> name, why do tracebacks use func.func_code.co_name instead of
> fun
On Mon, 24 Mar 2008 06:48:10 -0700, Arnaud Delobelle wrote:
> On Mar 24, 1:26 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote:
>> > The fact that .func_name (which is writeable) is not used at first
>> > surprised me unti
On Mar 24, 1:26 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote:
> > The fact that .func_name (which is writeable) is not used at first
> > surprised me until I remembered that code objects can potentially be
> > used by mult
On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote:
> The fact that .func_name (which is writeable) is not used at first
> surprised me until I remembered that code objects can potentially be
> used by multiple function objects and hence are not connected to any one
> in particular.
How does t
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Unfortunately there's nothing we can do to fix that error. Even though
| the function object has an attribute "__name__" (also known as
| "func_name") which is set to spam, it isn't used for tracebacks. Instead,
| the