function attributes are like function objects

Aahz Maruch aahz at
Sat Feb 3 01:58:14 EST 2001

In article <mailman.981171622.11894.python-list at>,
Barry A. Warsaw <barry at> wrote:
>>>>>> "GG" == Geoffrey Gerrietts <geoff at> writes:
>    GG> Not to pick nits, just that the question is about
>    GG> introspection, not about whether regular namespace semantics
>    GG> work, or whether our functions are really first-class objects.
>Okay, so introspection works no differently for functions as any other
>object with writable attributes (e.g. classes, instances, modules).
>You can use getattr() to test whether a function has a particular
>attribute, and setattr() to set that attribute.

I think the issue is that Geoffrey suddenly realized that there's no
"self" equivalent for functions.
                      --- Aahz (Copyright 2001 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

"People sometimes focus too much on the fact of communication rather than
the substance of communication."  --Dave Morton

More information about the Python-list mailing list