Bug report
Bug description:
The symtablemodule.c file does not export DEF_COMP_ITER, DEF_TYPE_PARAM and DEF_COMP_CELL. Those flags seem to have been added after the original ones so they were probably missed/forgotten. Here is a MWE for DEF_TYPE_PARAM:
>>> import symtable
>>> s = symtable.symtable("class A[T]: pass", "?", "exec")
>>> s.get_children()[0].lookup('T')
<symbol 'T': LOCAL, DEF_LOCAL>
By the way, there are tests that are missing for those cases in test_symtable, so I can also add the corresponding test. I'm opening a PR now, but feel free to close it if you do not want to expose too many compiler flags (though, I fail to understand why you would do so).
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
The
symtablemodule.cfile does not exportDEF_COMP_ITER,DEF_TYPE_PARAMandDEF_COMP_CELL. Those flags seem to have been added after the original ones so they were probably missed/forgotten. Here is a MWE forDEF_TYPE_PARAM:By the way, there are tests that are missing for those cases in
test_symtable, so I can also add the corresponding test. I'm opening a PR now, but feel free to close it if you do not want to expose too many compiler flags (though, I fail to understand why you would do so).CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
DEF_TYPE_PARAMcompiler flag #120028symtable.Symbol.__repr__correctly reflect the compiler's flags #120099symtable.c(remove deprecated macros and update some values) #120218symtable.c#120222