This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: <> in parser spec but not lexer spec
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: François-René.Rideau, docs@python, loewis
Priority: normal Keywords:

Created on 2014-08-05 16:35 by François-René.Rideau, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg224856 - (view) Author: François-René Rideau (François-René.Rideau) Date: 2014-08-05 16:35
As another follow up to http://bugs.python.org/issue21972

<> is mentioned in the parser spec: https://docs.python.org/3.5/reference/grammar.html
But not in the lexer spec: https://docs.python.org/3.5/reference/lexical_analysis.html

Either is a mistake.

I suggested in issue 21972 that the former was the bug, because it referred to a joke PEP and because <> doesn't actually work as a comparator in Python 3.4. The response by loewis was that the parser documentation was correct — well then the lexer documentation is incorrect.
msg224886 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-08-05 20:34
Neither nor. <> is a conditional token, conditional on the prior future import. This is the nature of PEP 236: some syntax might be part of the language in one module, but not in another, in the same version of the language.

In general, the documentation should refer to future syntax as such (i.e. mention that it is available only if a future import was made). Not so in this case: this specific feature is deliberately undocumented (or: under-documented, given that nothing is truly undocumented in free software). It's an easter egg - you found it.
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66343
2014-08-11 03:03:59rhettingersetstage: resolved
2014-08-11 03:03:53rhettingersetstatus: open -> closed
resolution: not a bug
2014-08-05 20:34:23loewissetmessages: + msg224886
2014-08-05 16:35:23François-René.Rideaucreate