Dear Cython developers,
Python supports meta-programming, in which a variable with name
specified in a string can be created at run-time. One built-in library
which make use of this is argparse.
For example:
parser.add_argument('-N', '--max_threads', help='maximum number of
concurrent decoding threads', type=int, default=16)
in this case, the variable max_threads is created from the string
argument. And then Cython will generate an incorrect C program with
the following error:
smt.py:78:88: undeclared name not builtin: headtail
smt.c:1:2: error: #error Do not use this file, it is the result of a
failed Cython compilation.
In comparison, I found that nuitka can convert this kind of Python
programs sucessfully. I hope Cython can be improved. Thanks!
Cheers,
Xuancong
_______________________________________________
cython-devel mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cython-devel