[Tutor] __class__.__name__ for literal integer causes SyntaxError

2012-04-04 Thread Tim Johnson
See the following console session: >>> 4.6.__class__.__name__ 'float' >>> 6.__class__.__name__ File "", line 1 6.__class__.__name__ ^ SyntaxError: invalid syntax >>> x = 6 >>> x.__class__.__name__ 'int' >>> "me".__class__.__name__ 'str' I note that the reference to '__class__.__

Re: [Tutor] __class__.__name__ for literal integer causes SyntaxError

2012-04-04 Thread Emile van Sebille
On 4/4/2012 6:27 PM Tim Johnson said... See the following console session: 4.6.__class__.__name__ The first decimal is considered to be part of the float literal here... 'float' 6.__class__.__name__ ... _and_ here... File "", line 1 6.__class__.__name__ ^ SyntaxE

Re: [Tutor] __class__.__name__ for literal integer causes SyntaxError

2012-04-05 Thread Dave Angel
On 04/04/2012 10:27 PM, Emile van Sebille wrote: > On 4/4/2012 6:27 PM Tim Johnson said... >> See the following console session: > 4.6.__class__.__name__ > > The first decimal is considered to be part of the float literal here... > > >> 'float' > 6.__class__.__name__ > > ... _and_ here... >