Author Jon.Shemitz
Recipients Jon.Shemitz, docs@python, r.david.murray
Date 2014-02-20.00:04:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAOqJgSRd_uV3C5JsbO75CdOAm4-TxVJ7ohUzxf5XJcLyOUXkAA@mail.gmail.com>
In-reply-to <1392854387.93.0.542975779821.issue20692@psf.upfronthosting.co.za>
Content
That makes sense. Perhaps, then, the tutorial should include the FAQ? (I
can't be the only person who thought to try this.)

On Wed, Feb 19, 2014 at 3:59 PM, R. David Murray <report@bugs.python.org>wrote:

>
> R. David Murray added the comment:
>
> It's actually almost a FAQ at this point.  The answer is that because of
> the way the parser works (it's a relatively simple parser, and we want to
> keep it that way), the tokenizer sees the '.' as making the token a float,
> and '3.__class__' is not a valid float token. So you have to precede the
> period by something that allows the tokenizer to know it isn't a decimal
> point.  Parens is one way.  Believe it or not, a space is another:
>
>   >>> 3 .__class__
>   <class 'int'>
>
> ----------
> nosy: +r.david.murray
> resolution:  -> invalid
> stage:  -> committed/rejected
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue20692>
> _______________________________________
>
History
Date User Action Args
2014-02-20 00:04:23Jon.Shemitzsetrecipients: + Jon.Shemitz, r.david.murray, docs@python
2014-02-20 00:04:23Jon.Shemitzlinkissue20692 messages
2014-02-20 00:04:23Jon.Shemitzcreate