Any way of adding methods/accessors to built-in classes?
bearophileHUGS at lycos.com
bearophileHUGS at lycos.com
Wed Oct 25 15:52:56 EDT 2006
Kenneth McDonald:
> not being able to do things like '[1,2,3]'.length
> drives me a little nuts.
This is interesting, why?
(In a computer language too much purity is often bad. And isn't
[1,2,3].len better?)
I think you can't add methods to Python builtin classes, I think you
can do it with Ruby.
Bye,
bearophile
More information about the Python-list
mailing list