This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author con-f-use
Recipients con-f-use
Date 2018-07-09.15:57:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za>
In-reply-to
Content
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/
History
Date User Action Args
2018-07-09 15:57:52con-f-usesetrecipients: + con-f-use
2018-07-09 15:57:52con-f-usesetmessageid: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za>
2018-07-09 15:57:52con-f-uselinkissue34076 messages
2018-07-09 15:57:52con-f-usecreate