mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)
… as proposed in PEP 572; key is now evaluated before value. https://bugs.python.org/issue35224
This commit is contained in:
parent
bb110cc2ed
commit
c8a35417db
8 changed files with 53 additions and 7 deletions
|
@ -473,6 +473,8 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
self.check_suite("foo(b := 2, a=1)")
|
||||
self.check_suite("foo((b := 2), a=1)")
|
||||
self.check_suite("foo(c=(b := 2), a=1)")
|
||||
self.check_suite("{(x := C(i)).q: x for i in y}")
|
||||
|
||||
|
||||
#
|
||||
# Second, we take *invalid* trees and make sure we get ParserError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue