Skip to content

Commit

Permalink
Change list to view object (GH-93661)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5d8e7a1)

Co-authored-by: Pamela Fox <[email protected]>
  • Loading branch information
miss-islington and pamelafox authored Jun 11, 2022
1 parent 1190b63 commit 58277de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Doc/library/symtable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion Lib/symtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 58277de

Please sign in to comment.