>>> 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


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to