[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-18 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-18 Thread miss-islington
miss-islington added the comment: New changeset a85fefe71b3bf56b1b3e72e752e0f962c3b0b487 by Lysandros Nikolaou in branch 'master': bpo-42381: Document walrus-related syntax changes in whatsnew (GH-23382) https://github.com/python/cpython/commit/a85fefe71b3bf56b1b3e72e752e0f962c3b0b487

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 87c87b5bd6f6a5924b485398f353308410f9d8c1 by Pablo Galindo in branch '3.9': [3.9] bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) (GH-2)

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-18 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- pull_requests: +22274 pull_request: https://github.com/python/cpython/pull/23382 ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Let’s make sure this is all written up in whatsnew. -- ___ Python tracker ___ ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +1 pull_request: https://github.com/python/cpython/pull/2 ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b0aba1fcdc3da952698d99aec2334faa79a8b68c by Pablo Galindo in branch 'master': bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) https://github.com/python/cpython/commit/b0aba1fcdc3da952698d99aec2334faa79a8b68c

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Okay. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Nagging question — is there sufficient difference between {x := y} and {x: y} > ? I think there is enough distinction, yes. It will also be a bit odd if is allowed in list and list comps but not set and set comps --

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: While {(a:='a'): (b:=1)} looks somewhat cleaner to me. -- ___ Python tracker ___ ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Not in anything dict please. Nagging question — is there sufficient difference between {x := y} and {x: y} ? -- ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > dict comprehension FWIW, unparenthesized walruses are still disallowed in dictcomps and to be honest, I'm not sure if we should allow them or not. I feel that allowing too many colons there would be too noisy. {a:='a': b:=1} doesn't really look too

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The only question left is that if we should allow this on dict literals and dict comprehensions as well (because these constructs have a ":" in the middle that can be noisy if there are walrus, the answer isn't immediately obvious to me). --

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Apparently we currently don't allow walruses in set literals either: >>> {y := 4, 4**2, 3**3} File "", line 1 {y := 4, 4**2, 3**3} ^ SyntaxError: invalid syntax But they should be allowed as well per PEP 572 (as the pep mentions all

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +0 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23332 ___ Python tracker

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I suppose the comprehensions should all have the same syntax inside their various brackets. -- ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : Since unparenthesized walruses are allowed in list comprehensions and in generator expressions, should we maybe allow them in set comprehensions as well? -- components: Interpreter Core messages: 381173 nosy: gvanrossum, lys.nikolaou, pablogsal