A Python 3000 Question
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Mon Oct 29 23:15:02 CET 2007
> a_string.list() instead of list(a_string)
A string can be stripped, "lowercased" or split, but why should it
be able to be "listed"? IMHO, list is a conversion function to make
a list from something.
>> And to answer the question. In OO programming generic functions
>> are no less important than classes and objects.
> Do they not take away from the OOness of the overall language and
> introduce inconsistencies?
Not at all. Explain, why should they? Functions can be objects, too.
And are in Python.
The inconsistencies arise, IMHO, if an OO language introduces
non-object types for performance reasons, after that gets wrapper
classes to wrap those primitives, and even later gets the ability
to automatically cast a primitive into a wrapper class instance.
That's just ugly.
BOFH excuse #56:
Electricians made popcorn in the power supply
More information about the Python-list