pre-PEP generic objects
Steven Bethard
steven.bethard at gmail.com
Tue Nov 30 11:36:17 EST 2004
Fredrik Lundh wrote:
> Steven Bethard wrote:
>
>>Currently, if a Python programmer makes this design decision, they are
>>forced to declare a new class, and then build instances of this class.
>
> FORCED to create a new class, and FORCED to create instances of
> their own class instead of your class?
I don't see any way to produce the same behavior without *someone* (the
user or the stdlib) declaring a class. If you see a way to do this
without a class declared somewhere, please let me know how...
> without this, Python must surely be unusable.
I definitely agree. Python without classes would be quite unpleasant to
use.
> no wonder nobody's ever managed to use it for anything.
Yeah, I don't think anyone's managed to use Python without classes for
years, especially since things like int, str, etc. were converted to types.
Steve
More information about the Python-list
mailing list