[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)

Barry A. Warsaw bwarsaw@cnri.reston.va.us
Fri, 14 Apr 2000 11:52:17 -0400 (EDT)


>>>>> "MH" == Mark Hammond <mhammond@skippinet.com.au> writes:

    MH> AFAIK, this would be a pretty serious change.  The compiler
    MH> just generates (basically)PyObject_SetAttr() calls.  There is
    MH> no way in the current runtime to differentiate between
    MH> "compile time" and "runtime" attribute references...  If this
    MH> was done, it would simply be ugly hacks to support what can
    MH> only be described as unpythonic in the first place!

    MH> [Unless of course Im missing something...]

You're not missing anything Mark!  Remember Python's /other/ motto:
"we're all consenting adults here".  If you don't wanna mutate your
function attrs at runtime... just don't! :)

-Barry