New submission from Nathan Woods <charlesnwo...@gmail.com>:

The following code works in an interactive shell or in a batch file, but not 
when executed as part of a unittest suite or pdb:

from random import random
out = [random() for ind in range(3)]

It can be made to work using pdb interact, but this doesn't help with unittest.

Tested in Python 3.7.2

----------
messages: 336270
nosy: woodscn
priority: normal
severity: normal
status: open
title: Enclosing scope not visible from within list comprehension
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36070>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to