On Thu, May 3, 2012 at 12:49 PM, Garrett Cooper <yaneg...@gmail.com> wrote:
>    I was wondering whether this was a parser bug or feature (seems
> like a bug, in particular because it implicitly encourages bad syntax,
> but I could be wrong). The grammar notes (for 2.7 at least [1]) don't
> seem to explicitly require a space between 'in' and another parser
> token (reserved work, expression, operand, etc), but I could be
> misreading the documentation.

The grammar doesn't require whitespace there.  It tends to be flexible
about whitespace wherever it's not necessary to resolve ambiguity.

>>> x = [3, 2, 1]
>>> x [0]if x [1]else x [2]
3
>>> 1 . real
1
>>> 1.5.real
1.5
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to