Why not 3.__class__ ?
Skip Montanaro
skip at pobox.com
Tue Sep 25 16:46:19 EDT 2001
>> The float type will be subclassable in the future (if not already
>> today in 2.2a3), at which point floating point numbers could indeed
>> have attributes that begin with the letter 'e' or even an attribute
>> named 'e17'.
Ignacio> Yeah, but how do you name a variable '3'?
You don't, but I wasn't thinking that far ahead... ;-)
Still, placing an arbitrary restriction on the attribute names of integers
because floats can be written as
int dot 'e' number
seems a bit "bizarre", even though you're not likely to run into that at any
point in the near future.
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list