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/2011-April/110923.html below:

[Python-Dev] Syntax quirk

[Python-Dev] Syntax quirk [Python-Dev] Syntax quirkRob Cliffe rob.cliffe at btinternet.com
Mon Apr 25 19:21:06 CEST 2011
 >>> type (3.)
<type 'float'>
 >>> 3..__class__
<type 'float'>
 >>> type(3)
<type 'int'>
 >>> 3.__class__
   File "<stdin>", line 1
     3.__class__
               ^
SyntaxError: invalid syntax

Superficially the last example ought to be legal syntax (and return 
<type 'int'>).
Is it an oversight which could be fixed in a straightforward way, or are 
there reasons why it can't?

I have tested this with Python 2.5 and Python 3.2.

Best wishes
Rob Cliffe


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