* Lint: Disable a couple potentially problematic/unneeded hooks
* Lint: Refine regex for existing Content-Type and PEP references checks
* Lint: Refine regex for Python-Version check and fix a couple deviations
* Lint: Refine regex for Created check and fix a couple deviations
* Lint: Refine regex for Resolution check and fix a few deviations
* Lint: Add new check for Post-History header
* Lint: Add check for Discussions-To header link
* Lint: Add basic check for PEP title presense & excessive length
* Lint: Add check for PEP/BDFL-Delegate header
* Lint: Add check for Sponsor header
* Lint: Add check for legacy Author field format
* Lint: Add check for RST Author field
* Lint: Use more helpful, user-oriented descriptions for header checks
* PEP 245: Add historical note and archive links to wiki page/email lsit
* PEP 628: Add direct link to resolution in acceptance message
* Lint: Explictly allow all valid RFC 2822 line continuations in headers
* Lint: Tweak Post-History and Resolution checks to accept fragments
Changes detected by Topy (https://github.com/intgr/topy), all changes
verified by hand, false positives have been omitted.
These range from straight-out misspellings to debatable hyphen placement.
The hyphen changes are supported by grammar manuals of style.
- switch from the new `TargetScopeError` to a plain `SyntaxError`
as per referenced python-dev discussion
- clarify rationale for those extra SyntaxError cases (we don't
want current CPython implementation details to implicitly leak into
the "do what CPython does" de facto language specification)
- broaden one of the error cases to handle the fact that CPython's
symbol table analysis for a comprehension involves two different
scopes and hence makes it difficult to detect when the target of
a named expression in the iterable expression gets re-used as an
iteration variable in the comprehension
- note that even dead code affects the symbol analysis pass
See bpo-36798.
This update specifies the interplay between f-strings and
the assignment operator. Specifically, it attempts to
clarify how to use assignment operators inside of f-strings.
- Delete 'Pending Acceptance' section
- Change reference implementation to proof of concept
- Add the ^L back before the Emacs Local Variables section
- Add Resolution link
* PEP 572: Tweaks suggested on python-dev by Glenn Linderman.
* Use Tim's rewording of the exceptional cases.
* Clarify that TargetScopeError is a *new* subclass of SyntaxError.
- Dropped "TODO: Include Guido's evidence, and do a more systematic search."
I think the current text is good enough.
- Relented on assignment expressions in default values other than top
level. (Mainly because the syntactic/semantic check would be
awkward, and it was already called out as a possible style
recommendation instead.)
- Clarified that a lambda counts as "the current scope" (containing an
assignment expression).
- Added prohibition on [... for i in i := ...].
- Specified that scope-related prohibitions should raise
TargetScopeError, a subclass of SyntaxError.
- Remove changes to comprehension scope
- Make := in comprehensions assign to containing non-comprehension scope
- Clarify binding precedence (tighter than comma, not at same level as =)
- Remove mention of more complex targets in the future
- Explicitly disallow toplevel :=
- Rewrite section on differences with =, enumerating all of them
- Remove "here's how this could be written without :=" from examples
- Tweak first paragraph of "Syntax and semantics"
- Add "Exception cases" (various explicit prohibitions)
- Clarify that lambda is a containing scope
- Clarify that := and = just don't mix
- Added "Open questions" section
- Added two new rejected alternatives: "Allowing commas to the right"
and "Always requiring parentheses"
- Minor edits
* Start a section on real code
* Correct/clarify "commas to the right" section
* Add Tim and Guido as authors
* Update abstract to mention :=
* Rule out targets conflicting with comprehension loop control
* Add timcode.txt as Appendix A
* Add os.fork() example
* Add TODOs about evaluation order