[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-14 Thread Łukasz Langa
Łukasz Langa added the comment: (FTR the fix is part of Python 3.8.0) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-14 Thread Pierre Quentel
Pierre Quentel added the comment: That was a quick fix, thanks ! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-14 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 927f07c816aad9f8ed961d7ace6a367837f7fa8f by Łukasz Langa (Miss Islington (bot)) in branch '3.8': bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755) (#16760) https://github.com/python/cpython/commit/927f07c816aad9f8ed

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +16331 pull_request: https://github.com/python/cpython/pull/16760 ___ Python tracker ___ __

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset fd5c414880b2e05720b9cf14ab0b0d7ae2b7d925 by Pablo Galindo in branch 'master': bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755) https://github.com/python/cpython/commit/fd5c414880b2e05720b9cf14ab0b0d7ae2b7

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > But is it really important enough to violate the desired "rc1 == release" > invariant? I created the fix because many other bug fixes have been merged since rc1 already so apologies if it seemed a bit precipitate. Let's see what the release manager

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +16328 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16755 ___ Python tracker ___

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for working on a fix. But is it really important enough to violate the desired "rc1 == release" invariant? It's up to the release manager. -- ___ Python tracker __

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am working on a fix now, se we can merge it before the final release -- ___ Python tracker ___ _

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: It's a bug, but it's honestly such an odd corner case that I don't think this should hold up the 3.8.0 release. Let's fix it in 3.9 and backport it to 3.8.1. -- priority: release blocker -> normal stage: -> needs patch

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think this is a bug in the symtable_extend_namedexpr_scope function because when visiting the stack in reverse order and finding a function block is always assigning the scope as DEF_NONLOCAL. Marking also as a release blocker unless Nick, Guido or

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +emilyemorehouse, gvanrossum, ncoghlan, pablogsal ___ Python tracker ___ ___ Python-bugs-

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pierre Quentel
New submission from Pierre Quentel : PEP 572 says that "an assignment expression occurring in a (...) comprehension (...) binds the target in the containing scope, honoring a nonlocal or global declaration for the target in that scope, if one exists." In Appendix B, the PEP shows this example