[Python-checkins] Change list to view object (#93661)
pablogsal
webhook-mailer at python.org
Sat Jun 11 06:54:42 EDT 2022
https://github.com/python/cpython/commit/5d8e7a124098add18a17b12270a66ca26b8cc058
commit: 5d8e7a124098add18a17b12270a66ca26b8cc058
branch: main
author: Pamela Fox <pamela.fox at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-06-11T11:54:31+01:00
summary:
Change list to view object (#93661)
files:
M Doc/library/symtable.rst
M Lib/symtable.py
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index 0264f891cc8c0..65ff5bfe7abd6 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 75ff0921f4c0d..5dd71ffc6b4f1 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -111,7 +111,7 @@ def has_children(self):
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()
More information about the Python-checkins
mailing list