Commit Graph

60 Commits

Author SHA1 Message Date
Guido van Rossum 6a681307a6
PEP 572: Explain why 'as TARGET' is inferior (#711)
Also (perhaps superfluously) explain what's wrong with `->`.
2018-07-09 08:16:01 -07:00
Guido van Rossum 6cb044c0cc
PEP 572: Move the proposed evaluation order change to "Syntax and semantics" (#710)
Remove "Open questions and TODOs" since they're now all decided.
2018-07-08 21:36:28 -07:00
Guido van Rossum a9b8753635
PEP 572: Address several small issues (#709)
- 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.
2018-07-08 21:35:44 -07:00
Guido van Rossum bd6332d245
PEP 572: get rid of side-by-side tables; drop unnecessary TODO (#708)
Alas, the side-by-side tables caused horribly misindented code.
2018-07-08 15:27:52 -07:00
Guido van Rossum 97ff8893b0
PEP 572: Add Appendix B with translations of various comprehension cases (#700) 2018-07-08 08:28:47 -07:00
Neil Schemenauer 5bfcc17b8e Fix trivial typo in PEP 572 (#691) 2018-07-07 15:37:55 -07:00
Guido van Rossum 23a91023fa
Add PEP 572 examples from stdlib (#698) 2018-07-07 14:05:56 -07:00
Guido van Rossum 5232173ad6 Add pending acceptance note and some TODOs 2018-07-05 17:21:28 -07:00
Guido van Rossum 6d81538ecb
Pep 572 update (#654)
- 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
2018-05-22 12:49:00 -07:00
Chris Angelico 433faca4cf PEP 572: Reword slightly to remove reference to students 2018-04-26 22:39:09 +10:00
Chris Angelico 4d93701cce PEP 572: Add additional motivation and examples 2018-04-25 15:32:22 +10:00
Chris Angelico 5466fb4518 PEP 572: Post anew 2018-04-25 01:29:49 +10:00
Chris Angelico b2378e6a59 PEP 572: Clarify wording 2018-04-24 17:22:41 +10:00
Chris Angelico 327d54250c PEP 572: Weaken proposal / strengthen requirements from "target" to "name" 2018-04-24 16:58:40 +10:00
Chris Angelico 1a3e52e197 PEP 572: Massively simplify and remove verbiage 2018-04-20 12:53:15 +10:00
Chris Angelico d3a5143cbc PEP 572: Acknowledge Guido and Christoph for the PEP's pivot 2018-04-18 23:15:42 +10:00
Chris Angelico b5a9edf7b4 PEP 572: Use the sloppy term "variables" instead of the strict-but-inaccurate "names" (since any assignment target is valid) 2018-04-18 23:05:10 +10:00
Chris Angelico 73715149df PEP 572: Final updates prior to posting to python-dev 2018-04-17 17:40:51 +10:00
Chris Angelico 1129ab3aa3 PEP 572: Mention another alternate syntax 2018-04-16 06:42:37 +10:00
Chris Angelico cf7e061167 PEP 572: Mention another rejected syntax 2018-04-13 22:40:36 +10:00
Chris Angelico ed718f5186 PEP 572: Clarify the problems with 'as' 2018-04-13 21:59:40 +10:00
Chris Angelico 5c2778d403 PEP 572: Update based on implementation experimentation 2018-04-13 21:34:33 +10:00
Chris Angelico 31841b36cb PEP 572: Fix markup 2018-04-13 09:29:27 +10:00
Chris Angelico 3560ce6d8c PEP 572: Fix what appears to be broken markup, though I don't quite see why 2018-04-12 23:42:53 +10:00
Chris Angelico cc611e43b8 PEP 572: Update based on feedback from python-ideas 2018-04-12 23:39:05 +10:00
Chris Angelico 582dfee5d0 PEP 572: Fix example to more accurately reflect reality 2018-04-11 19:47:12 +10:00
Chris Angelico 356c97ef43 PEP 572: Fix wording (thanks Ethan) 2018-04-11 16:21:15 +10:00
Chris Angelico 1a7c830cdb PEP 572: Add one open question 2018-04-11 15:30:34 +10:00
Chris Angelico c51be3df34 PEP 572: Fix markup (wow, I pushed the same bug twice in one day...) 2018-04-11 15:23:04 +10:00
Chris Angelico 6c0985fc9a PEP 572: Post to Python-Ideas again 2018-04-11 15:17:00 +10:00
Chris Angelico 9e5e64814a PEP 572: Add migration notes 2018-04-11 15:16:15 +10:00
Chris Angelico 423b65b131 PEP 572: Fix markup 2018-04-11 13:47:25 +10:00
Chris Angelico 71fea57f19 PEP 572: Document the changes to comprehensions 2018-04-11 11:07:42 +10:00
Chris Angelico 731071e222 PEP 572: Wholesale rewrites to bring the document in line with reality 2018-04-09 11:41:59 +10:00
Chris Angelico 3c27cf1f3c PEP 572: Replace "SLNB" with "sublocal" and improve wording in many places 2018-03-26 09:59:47 +11:00
Chris Angelico 0950cdfb92 PEP 572: Enhance and categorize the use-cases 2018-03-26 04:07:50 +11:00
Chris Angelico c5b251e756 PEP 572: Add another alternate spelling 2018-03-24 20:25:27 +11:00
Chris Angelico af7b76f545 PEP 572: Rework the alternatives section into separate categories 2018-03-24 13:35:26 +11:00
Chris Angelico 3541449faf PEP 572: Updates in response to posting #3 :) 2018-03-24 05:11:45 +11:00
Chris Angelico 63be12066a PEP 572: Reword and update in response to mailing list changes 2018-03-23 20:57:38 +11:00
Chris Angelico d5298fc7be PEP 572: Add a section detailing how SLNBs are different from regular 2018-03-03 03:00:05 +11:00
Chris Angelico 315026e1e1 Post PEP 572 to Python-Ideas anew 2018-03-02 22:41:51 +11:00
Chris Angelico e0cdb1abb2 PEP 572: Mention the problem of closures 2018-03-02 22:39:36 +11:00
Chris Angelico a81f68c35c PEP 572: Add additional rationale from while loops 2018-03-02 22:26:35 +11:00
Chris Angelico 2f1b0d36fc PEP 572: Update implementation notes and add an example 2018-03-02 22:23:41 +11:00
Chris Angelico c36c28ff72 PEP 572: Remove SLNBs from locals() to eliminate confusion 2018-03-02 20:05:31 +11:00
Chris Angelico 0b1c874bd5 PEP 572: Mention another alternate proposal 2018-03-02 17:51:55 +11:00
Chris Angelico f91ce9cb07 PEP 572: Alter the definition of assignment through SLNBs 2018-03-02 02:25:02 +11:00
Chris Angelico c084673770 PEP 572: Add another alternate syntax to the pile 2018-03-01 17:33:47 +11:00
Chris Angelico 5c42f83122 PEP 572: Create a (small) section on execution order - needs more examples 2018-03-01 17:18:33 +11:00