Re: [Python-Dev] Syntax quirk

2011-04-25 Thread Terry Reedy
On 4/25/2011 1:21 PM, Rob Cliffe wrote: >>> type (3.) >>> 3..__class__ >>> type(3) >>> 3.__class__ File "", line 1 3.__class__ ^ SyntaxError: invalid syntax Superficially the last example ought to be legal syntax (and return ). You are a more sophisticated parser than Python, which is l

Re: [Python-Dev] Syntax quirk

2011-04-25 Thread Nick Coghlan
On Tue, Apr 26, 2011 at 3:21 AM, Rob Cliffe wrote: type (3.) > 3..__class__ > type(3) > 3.__class__ >  File "", line 1 >    3.__class__ >              ^ > SyntaxError: invalid syntax > > Superficially the last example ought to be legal syntax (and return 'int'>). > Is it an

Re: [Python-Dev] Syntax quirk

2011-04-25 Thread Alexander Belopolsky
On Mon, Apr 25, 2011 at 1:21 PM, Rob Cliffe wrote: .. 3.__class__ >  File "", line 1 >    3.__class__ >              ^ > SyntaxError: invalid syntax > > Superficially the last example ought to be legal syntax (and return 'int'>). If it was valid, then >>> 3.e+7 would have to raise an attr

[Python-Dev] Syntax quirk

2011-04-25 Thread Rob Cliffe
>>> type (3.) >>> 3..__class__ >>> type(3) >>> 3.__class__ File "", line 1 3.__class__ ^ SyntaxError: invalid syntax Superficially the last example ought to be legal syntax (and return ). Is it an oversight which could be fixed in a straightforward way, or are there reaso