Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in the lexer and parser documentation #66171

Closed
Franois-RenRideau mannequin opened this issue Jul 13, 2014 · 7 comments
Closed

Bugs in the lexer and parser documentation #66171

Franois-RenRideau mannequin opened this issue Jul 13, 2014 · 7 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@Franois-RenRideau
Copy link
Mannequin

Franois-RenRideau mannequin commented Jul 13, 2014

BPO 21972
Nosy @loewis, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2014-08-05.16:03:12.304>
created_at = <Date 2014-07-13.03:49:36.086>
labels = ['type-bug', 'docs']
title = 'Bugs in the lexer and parser documentation'
updated_at = <Date 2014-08-05.16:03:12.303>
user = 'https://bugs.python.org/Franois-RenRideau'

bugs.python.org fields:

activity = <Date 2014-08-05.16:03:12.303>
actor = 'loewis'
assignee = 'docs@python'
closed = True
closed_date = <Date 2014-08-05.16:03:12.304>
closer = 'loewis'
components = ['Documentation']
creation = <Date 2014-07-13.03:49:36.086>
creator = 'Fran\xc3\xa7ois-Ren\xc3\xa9.Rideau'
dependencies = []
files = []
hgrepos = []
issue_num = 21972
keywords = []
message_count = 7.0
messages = ['222906', '222907', '222936', '224844', '224846', '224847', '224850']
nosy_count = 5.0
nosy_names = ['loewis', 'benjamin.peterson', 'docs@python', 'python-dev', 'Fran\xc3\xa7ois-Ren\xc3\xa9.Rideau']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue21972'
versions = ['Python 3.5']

@Franois-RenRideau
Copy link
Mannequin Author

Franois-RenRideau mannequin commented Jul 13, 2014

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

@Franois-RenRideau Franois-RenRideau mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Jul 13, 2014
@loewis
Copy link
Mannequin

loewis mannequin commented Jul 13, 2014

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?

@Franois-RenRideau
Copy link
Mannequin Author

Franois-RenRideau mannequin commented Jul 13, 2014

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.

@loewis
Copy link
Mannequin

loewis mannequin commented Aug 5, 2014

The ellipsis is also mentioned: "A sequence of three periods has a special meaning as an ellipsis literal."

@loewis
Copy link
Mannequin

loewis mannequin commented Aug 5, 2014

The PEP-401 joke actually works:

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

I'll add a smiley

@python-dev
Copy link
Mannequin

python-dev mannequin commented Aug 5, 2014

New changeset 57740d19f5c2 by Martin v. Löwis in branch 'default':
Issue bpo-21972: Make it clear that the PEP-401 future import works,
http://hg.python.org/cpython/rev/57740d19f5c2

@loewis
Copy link
Mannequin

loewis mannequin commented Aug 5, 2014

I've moved the @ operator into bpo-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.

@loewis loewis mannequin closed this as completed Aug 5, 2014
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants