bpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module (GH-9872)
The symbol table was not exposing functionality to query the nonlocal symbols
in a function or to check if a particular symbol is nonlocal.
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index ba2caff..7c6ac4d 100644
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -105,6 +105,10 @@
Return a tuple containing names of globals in this function.
+ .. method:: get_nonlocals()
+
+ Return a tuple containing names of nonlocals in this function.
+
.. method:: get_frees()
Return a tuple containing names of free variables in this function.
@@ -144,6 +148,10 @@
Return ``True`` if the symbol is global.
+ .. method:: is_nonlocal()
+
+ Return ``True`` if the symbol is nonlocal.
+
.. method:: is_declared_global()
Return ``True`` if the symbol is declared global with a global statement.