Message321326
The python code:
```
class _tri(object):
infts = '(+/-)inf, (+/-)infty, (+/-)infinity'
strange_failing = {x+s.replace('(+/-)',''):None for x in ('+','-','') for s in infts.split(', ')}
```
gives a `global name 'infts' is not defined` exception, when normal dictionary comprehensions (without nested loops) and regular nested for-loops work perfectly well.
For a complete shell session and more illustrative example in versions 2.7.15 and 3.6.4 see: https://pastebin.ubuntu.com/p/9Pg8DThbsd/ |
|
Date |
User |
Action |
Args |
2018-07-09 15:57:52 | con-f-use | set | recipients:
+ con-f-use |
2018-07-09 15:57:52 | con-f-use | set | messageid: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> |
2018-07-09 15:57:52 | con-f-use | link | issue34076 messages |
2018-07-09 15:57:52 | con-f-use | create | |
|