Closed
Description
Hi,
The simple list comprehension does not seem to work.
libs = 'mkl , , openblas, blis, '
print(libs)
print([b for b in [a.strip() for a in libs.split(',')] if b])
CPython
mkl , , openblas, blis,
['mkl', 'openblas', 'blis']
Graal Python
Traceback (most recent call last):
File "/home/ryutas/graalpython/list_comprehension/test.py", line 3, in <module 'test.py'>
print([b for b in [a.strip() for a in libs.split(',')] if b])
NameError: name 'a' is not defined
Could this be a bug in Graal Python?