4 ms·
> My big regret with Python 3.0 is that the scoping rules in list expressions changed to prohibit modification of variables in surrounding scope. This degraded
by UncleEntity 8y ago
> My big regret with Python 3.0 is that the scoping rules in list expressions changed to prohibit modification of variables in surrounding scope. This degraded the utility of list expressions. The work around is so long-winded.
Ironically, the PEP to add this to py3k is what's causing all the fuss in pythonland lately.
- riazrizvi 8y agoActually I think it was 'fixed' as a syntax change in Python 3, https://docs.python.org/3/whatsnew/3.0.html#changed-syntax https://docs.python.org/3/whatsnew/3.0.html#changed-syntax "List comprehensions no longer support the syntactic form..."
- kjeetgill 8y agoHe's talking about something a little different. Python is introducing assignment expressions (vs assignment statements).