. Python 2.1 function attributes

Barry A. Warsaw barry at digicool.com
Sat Jan 27 10:52:11 EST 2001


>>>>> "RK" == Roy Katz <katz at Glue.umd.edu> writes:

    RK> I find the argument for function attributes weak.  Hell, I
    RK> wish to abolish .__doc__ for functions as well.  It just
    RK> doesn't seem consistent.  Functions are functions, classes are
    RK> classes.  It seems to me even kludgier than print>>.

Or look at it a different way.  Function are objects, classes are
objects, instances are objects.  Objects have attributes.  You can
even set user-defined attributes on many objects.  Now there's one
more object on which you can set user-defined attributes.  In that
light, function attributes remove a previous restriction.

-Barry




More information about the Python-list mailing list