On PEP 322 (ireverse)
aleaxit at yahoo.com
Sat Nov 1 16:55:33 CET 2003
>>built-in functions normally can't, and in that way they differ from
>>C-coded functions. So, iter would have to be changed into a different
>>type that _does_ support some attributes.
> Did you mean "Python-coded"? Anyway, I doubt that adding an attribute
> to iter() would cause problems the way changing it to a type constructor
> would. I'm not suggesting this, mind, just curious why nobody else
> mentioned the possibility.
I think one needs *more* work to add an attribute to a C-coded function:
it needs to be made into a different type. To add a classmethod to a type
one only needs to supply the classmethod flag in one's C sources -- hard
to see how that might be more troublesome...?
More information about the Python-list