[issue42316] Walrus Operator in list index

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: New changeset cae60187cf7a7b26281d012e1952fafe4e2e97e9 by Lysandros Nikolaou in branch 'master': bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317) https://github.com/python/cpython/commit/cae60187cf7a7b26281d012e1952fafe4e2e97e9 ---

[issue42316] Walrus Operator in list index

2020-11-16 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- nosy: +lys.nikolaou nosy_count: 3.0 -> 4.0 pull_requests: +22208 pull_request: https://github.com/python/cpython/pull/23317 ___ Python tracker ___

[issue42316] Walrus Operator in list index

2020-11-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +22182 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23291 ___ Python tracker ___ _

[issue42316] Walrus Operator in list index

2020-11-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: PEP 572 does not saw much of anything about when parens are needed. Nor does the low priority itself. Looking through the grammar of expressions, an assignment_expression is also a starred_expression, a positional_item (in calls), and the first part of a c

[issue42316] Walrus Operator in list index

2020-11-10 Thread Brandon
New submission from Brandon : Reading the PEP 572 document I don't see anything stating that Walrus operator in list indexes must be enclosed in parenthesis. Minimal Example: ''' In [1]: a = list(range(10)) In [2]: idx = -1 In [3]: a[idx := idx +1] File "", line 1 a[idx := idx +1]