Title: Bugs in the lexer and parser documentation
Type: behavior Stage:
Components: Documentation Versions: Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: François-René.Rideau, benjamin.peterson, docs@python, loewis, python-dev
Priority: normal Keywords:

Created on 2014-07-13 03:49 by François-René.Rideau, last changed 2014-08-05 16:03 by loewis. This issue is now closed.

Messages (7)
msg222906 - (view) Author: François-René Rideau (François-René.Rideau) Date: 2014-07-13 03:49
The lexer documentation says that the u prefix works on strings since 3.3, but doesn't explain what or how, which is all the more problematic since it explicitly mentions difference from the behavior documented in Python 2.

It also doesn't specify the ELLIPSIS token or the <> future token mentioned in the grammar (that should probably be removed, for PEP 401 is a joke — unless that's intentional, in which case a smiley might be useful).
msg222907 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-07-13 04:09
I don't understand. It says "it is possible again to prefix unicode strings with a u prefix" which seems to include both what ("prefix unicode strings") and how ("with a u prefix").

Can you propose specific wording that you want to see included?
msg222936 - (view) Author: François-René Rideau (François-René.Rideau) Date: 2014-07-13 15:03
Actually, my reading was buggy, and the "u" part is well-documented enough. Apologies for this part of the bug report.

The lexer documentation is still missing the ellipsis, though

Other bug I found in the lexer documentation: missing @=

And the parser documentation of <> is probably a bug.
msg224844 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-08-05 15:39
The ellipsis is also mentioned: "A sequence of three periods has a special meaning as an ellipsis literal."
msg224846 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-08-05 15:51
The PEP 401 joke actually works:

>>> from __future__ import barry_as_FLUFL
>>> 3<>4

I'll add a smiley
msg224847 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-05 15:56
New changeset 57740d19f5c2 by Martin v. Löwis in branch 'default':
Issue #21972: Make it clear that the PEP 401 future import works,
msg224850 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-08-05 16:02
I've moved the @ operator into #22142. With that, it seems to me that all aspects of this report are resolved.

François-René, for the future, please submit an individual bug report for each independent issue; this makes it easier tracking what has and hasn't been resolved.
Date User Action Args
2014-08-05 16:03:12loewissetstatus: open -> closed
resolution: fixed
2014-08-05 16:02:50loewissetmessages: + msg224850
2014-08-05 15:56:54python-devsetnosy: + python-dev
messages: + msg224847
2014-08-05 15:51:49loewissetmessages: + msg224846
2014-08-05 15:39:28loewissetmessages: + msg224844
2014-08-05 05:31:47ezio.melottisetnosy: + benjamin.peterson
2014-07-13 15:03:19François-René.Rideausetmessages: + msg222936
2014-07-13 04:09:29loewissetnosy: + loewis
messages: + msg222907
2014-07-13 03:49:36François-René.Rideaucreate