summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Fox <pamela.fox@gmail.com>2022-06-11 10:54:31 (GMT)
committerGitHub <noreply@github.com>2022-06-11 10:54:31 (GMT)
commit5d8e7a124098add18a17b12270a66ca26b8cc058 (patch)
treeab7b22df93424769b96758a017be4c9f68228447
parentbc3b31ea776ecb7088c8c2acd121499be8e8638b (diff)
downloadcpython-5d8e7a124098add18a17b12270a66ca26b8cc058.zip
cpython-5d8e7a124098add18a17b12270a66ca26b8cc058.tar.gz
cpython-5d8e7a124098add18a17b12270a66ca26b8cc058.tar.bz2
Change list to view object (#93661)
-rw-r--r--Doc/library/symtable.rst3
-rw-r--r--Lib/symtable.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index 0264f89..65ff5bf 100644
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -69,7 +69,8 @@ Examining Symbol Tables
.. method:: get_identifiers()
- Return a list of names of symbols in this table.
+ Return a view object containing the names of symbols in the table.
+ See the :ref:`documentation of view objects <dict-views>`.
.. method:: lookup(name)
diff --git a/Lib/symtable.py b/Lib/symtable.py
index 75ff092..5dd71ff 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -111,7 +111,7 @@ class SymbolTable:
return bool(self._table.children)
def get_identifiers(self):
- """Return a list of names of symbols in the table.
+ """Return a view object containing the names of symbols in the table.
"""
return self._table.symbols.keys()