exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
13.95k stars 498 forks source link

Fix accessing imported modules’ globals in list comprehensions #514

Closed minitech closed 6 months ago

minitech commented 6 months ago

What I hope is a correct fix for a bug I encountered with this code:

import sys

bwt = [
    "" if c == "$" else c
    for c in sys.argv[1]
]
burrow.codon:42:14-25: error: name 'argv' is not defined
cla-bot[bot] commented 6 months ago

Thank you for your pull request. We require contributors to agree to our Contributor License Agreement (https://exaloop.io/cla.txt), and we don't have @minitech on file. In order for us to review and merge your code, please email info@exaloop.io to get yourself added.

minitech commented 6 months ago

@cla-bot check

cla-bot[bot] commented 6 months ago

The cla-bot has been summoned, and re-checked this pull request!

inumanag commented 6 months ago

Thank you for this! I have merged it to #515.