Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
picnixz committed Jun 6, 2024
commit f795499f5ee200292e276642601944ca6aab5369
20 changes: 10 additions & 10 deletions Doc/library/symtable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ Examining Symbol Tables
in the class.

Note that the term 'method' here designates *any* function directly
declared via :keyword:`def` inside the class body. For instance:

>>> import symtable
>>> st = symtable.symtable("class A:\n"
... " def f(): pass\n"
... " def g(self): pass\n",
... "test", "exec")
>>> class_A = st.get_children()[0]
>>> class_A.get_methods()
('f', 'g')
declared via :keyword:`def` inside the class body. For instance::

>>> import symtable
>>> st = symtable.symtable("class A:\n"
... " def f(): pass\n"
... " def g(self): pass\n",
... "test", "exec")
>>> class_A = st.get_children()[0]
>>> class_A.get_methods()
('f', 'g')

.. class:: Symbol

Expand Down