mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-120029: make symtable.Symbol.__repr__ correctly reflect the compiler's flags, add methods (#120099)
Expose :class:`symtable.Symbol` methods :meth:`~symtable.Symbol.is_free_class`, :meth:`~symtable.Symbol.is_comp_iter` and :meth:`~symtable.Symbol.is_comp_cell`. --------- Co-authored-by: Carl Meyer <carl@oddbird.net>
This commit is contained in:
parent
7dd8c37a06
commit
755dab719d
7 changed files with 100 additions and 6 deletions
|
|
@ -81,6 +81,8 @@ symtable_init_constants(PyObject *m)
|
|||
if (PyModule_AddIntMacro(m, DEF_IMPORT) < 0) return -1;
|
||||
if (PyModule_AddIntMacro(m, DEF_BOUND) < 0) return -1;
|
||||
if (PyModule_AddIntMacro(m, DEF_ANNOT) < 0) return -1;
|
||||
if (PyModule_AddIntMacro(m, DEF_COMP_ITER) < 0) return -1;
|
||||
if (PyModule_AddIntMacro(m, DEF_COMP_CELL) < 0) return -1;
|
||||
|
||||
if (PyModule_AddIntConstant(m, "TYPE_FUNCTION", FunctionBlock) < 0)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue