A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-November/049917.html below:

[Python-Dev] Re: Int literals and method calls

[Python-Dev] Re: Int literals and method calls [Python-Dev] Re: Int literals and method callsScott David Daniels Scott.Daniels at Acm.Org
Sun Nov 14 21:50:00 CET 2004
Kay Schluehr wrote:
> But this won't be true for int literals and float literals ...
> The expression below raises an error:
> 
>  >>> 1.__class__
> Traceback (  File "<interactive input>", line 1
>    1.__class__
>              ^
> SyntaxError: invalid syntax
But the expressions below both work:
     >>> 2 .__class__
     <type 'int'>
     >>> (3).__class__
     <type 'int'>

> So it seems to be a parser-problem, 
To the extent it _is_ a problem, it is a lexer problem.  However,
"In the face of ambiguity, refuse to guess."

-- Scott David Daniels
Scott.Daniels at Acm.Org

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4