diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2018-10-20 00:46:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-20 00:46:00 (GMT) |
commit | d5b4f1b5a064c0d858352100fcddb91c363afa51 (patch) | |
tree | cae99173cc824e62289c7ebd8e5be290a206d0c1 /Doc | |
parent | 6395844e6adebc12c4eba1fb75c5e7c9c8b89f85 (diff) | |
download | cpython-d5b4f1b5a064c0d858352100fcddb91c363afa51.zip cpython-d5b4f1b5a064c0d858352100fcddb91c363afa51.tar.gz cpython-d5b4f1b5a064c0d858352100fcddb91c363afa51.tar.bz2 |
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.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/symtable.rst | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ Examining Symbol Tables 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 @@ Examining Symbol Tables 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. |