[Python-Dev] Syntax quirk
Alexander Belopolsky
alexander.belopolsky at gmail.com
Mon Apr 25 19:33:40 CEST 2011
On Mon, Apr 25, 2011 at 1:21 PM, Rob Cliffe <rob.cliffe at btinternet.com> wrote:
..
>>>> 3.__class__
> File "<stdin>", line 1
> 3.__class__
> ^
> SyntaxError: invalid syntax
>
> Superficially the last example ought to be legal syntax (and return <type
> 'int'>).
If it was valid, then
>>> 3.e+7
would have to raise an attribute error instead of
>>> 3.e+7
30000000.0
More information about the Python-Dev
mailing list