Why not 3.__class__ ?

Ignacio Vazquez-Abrams ignacio at openservices.net
Tue Sep 25 16:26:00 EDT 2001


On Tue, 25 Sep 2001, Skip Montanaro wrote:

>
>     >> No, but that wouldn't be the only cause of ambiguity. Consider
>     >> "3.e17". This could be either a number in scientific notation, or the
>     >> e17 attribute of the 3. literal.
>
>     Marcin> Numbers don't have attributes named with 'e' and digits, so
>     Marcin> resolving this ambiguity to scientific notation doesn't cause
>     Marcin> trouble to any useful program.
>
> 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'.

Yeah, but how do you name a variable '3'?

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list