. Python 2.1 function attributes
Roy Katz
katz at Glue.umd.edu
Fri Jan 26 23:36:43 EST 2001
My question is this:
what is the point of letting functions have attributes when
the same role is fulfilled cleanly by classes which implement
__call__()?
My previous long post showed an example.
Roey
On Fri, 26 Jan 2001, Terry Reedy wrote:
> 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