function attributes are like function objects

Donn Cave donn at u.washington.edu
Thu Feb 1 12:05:01 EST 2001


Quoth Michael Hudson <mwh21 at cam.ac.uk>:
| Greg Ewing <greg at cosc.canterbury.ac.nz> writes:
|> Everything? What about lists, dicts, tuples, file
|> objects...?
|> 
|> What's so special about functions that we need to
|> be able to plonk arbitrary attributes on them, but
|> not any other builtin types?
|
| The fact that people were using the one attribute they could get at
| (__doc__) for things far from its original purpose?

No, that can't be it.  Programmers will abuse all kinds of
language features;  sometimes it is indeed in the service
of good, but just as often it's utterly misguided.

My curiosity is killing me.  How does function attributes
make Python better?

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list