Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore failure to delete list comp variables
When iterating over a generator expression `gen` in a list comprehension `[for x in gen]`, the local variable `x` holds the value of each generated expression. When the list comprehension is done being evaluated, the local variable `x` needs to be deleted. This was already being done. If, however, `gen` is empty, `x` is never defined, and so deleting it causes an error. This patch adds a check to ignore that error.
- Loading branch information