[issue21972] Bugs in the lexer and parser documentation

New submission from François-René Rideau: 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). https://docs.python.org/3.5/reference/lexical_analysis.html ---------- assignee: docs@python components: Documentation messages: 222906 nosy: François-René.Rideau, docs@python priority: normal severity: normal status: open title: Bugs in the lexer and parser documentation type: behavior versions: Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Martin v. Löwis added the comment: 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? ---------- nosy: +loewis _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

François-René Rideau added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- nosy: +benjamin.peterson _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Martin v. Löwis added the comment: The ellipsis is also mentioned: "A sequence of three periods has a special meaning as an ellipsis literal." ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Martin v. Löwis added the comment: The PEP 401 joke actually works:
from __future__ import barry_as_FLUFL 3<>4 True
I'll add a smiley ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Roundup Robot added the comment: New changeset 57740d19f5c2 by Martin v. Löwis in branch 'default': Issue #21972: Make it clear that the PEP 401 future import works, http://hg.python.org/cpython/rev/57740d19f5c2 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Martin v. Löwis added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________

Changes by Martin v. Löwis <martin@v.loewis.de>: ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21972> _______________________________________
participants (4)
-
Ezio Melotti
-
François-René Rideau
-
Martin v. Löwis
-
Roundup Robot