From 03267c8cf301e17989475d4ea495a8101e420d14 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Sat, 11 Jun 2022 03:54:31 -0700 Subject: [PATCH] Change list to view object (GH-93661) (cherry picked from commit 5d8e7a124098add18a17b12270a66ca26b8cc058) Co-authored-by: Pamela Fox --- Doc/library/symtable.rst | 3 ++- Lib/symtable.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst index 0264f891cc8c06..65ff5bfe7abd61 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 `. .. method:: lookup(name) diff --git a/Lib/symtable.py b/Lib/symtable.py index 75ff0921f4c0db..5dd71ffc6b4f19 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()