From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 11 Jun 2022 11:13:38 +0000 (-0700) Subject: Change list to view object (GH-93661) X-Git-Tag: v3.10.6~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=58277de8e651df287ceae053eeb321c0f8406a1b;p=thirdparty%2FPython%2Fcpython.git Change list to view object (GH-93661) (cherry picked from commit 5d8e7a124098add18a17b12270a66ca26b8cc058) Co-authored-by: Pamela Fox --- diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst index e364232247c2..362220dc71a2 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 98db1e2557d3..e11e5fffc4e1 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()