. Python 2.1 function attributes

Terry Reedy tjreedy at udel.edu
Fri Jan 26 21:24:10 EST 2001


"Roy Katz" <katz at Glue.umd.edu> wrote in message
news:Pine.GSO.4.21.0101260824430.1922-100000 at y.glue.umd.edu...
> Hello..
>
> I posted before a much longer version of this question but I got only one
> response.  What do function attributes give that cannot be accomplished
> with function objects?

Since functions are and always (for at least five years) have been
(Py)Objects and since they have always had attributes (like many other
types of PyObjects), it is still not clear what you are asking, and hence
the paucity of answers.

The new thing in 2.1 is to allow users to directly set as well as read
user-defined function attributes.  This eliminates the need for certain
kludgy workarounds that people have been resorting to.

Terry J. Reedy






More information about the Python-list mailing list