Message321326
| 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: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 |
|