diff --git a/Include/internal/pycore_symtable.h b/Include/internal/pycore_symtable.h index 37464aa80ac7feb..d51bbd6f0a4e0fe 100644 --- a/Include/internal/pycore_symtable.h +++ b/Include/internal/pycore_symtable.h @@ -161,6 +161,11 @@ extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); #define SCOPE_OFFSET 11 /* 1 + highest bit for a DEF_* flag */ #define SCOPE_MASK 0b111 /* 3 bits for storing the scope */ +// Scopes for a symbol. +// +// GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol +// table. For symbols with such scopes, the ``symtable.Symbol.is_global`` +// method returns True. #define LOCAL 1 #define GLOBAL_EXPLICIT 2 #define GLOBAL_IMPLICIT 3