@@ -187,57 +187,6 @@ Examining Symbol Tables
187187
188188 A namespace of a class. This class inherits from :class: `SymbolTable `.
189189
190- .. method :: get_methods()
191-
192- Return a tuple containing the names of method-like functions declared
193- in the class.
194-
195- Here, the term 'method' designates *any * function defined in the class
196- body via :keyword: `def ` or :keyword: `async def `.
197-
198- Functions defined in a deeper scope (e.g., in an inner class) are not
199- picked up by :meth: `get_methods `.
200-
201- For example:
202-
203- .. testsetup :: symtable.Class.get_methods
204-
205- import warnings
206- context = warnings.catch_warnings()
207- context.__enter__()
208- warnings.simplefilter("ignore", category=DeprecationWarning)
209-
210- .. testcleanup :: symtable.Class.get_methods
211-
212- context.__exit__()
213-
214- .. doctest :: symtable.Class.get_methods
215-
216- >>> import symtable
217- >>> st = symtable.symtable('''
218- ... def outer (): pass
219- ...
220- ... class A :
221- ... def f ():
222- ... def w (): pass
223- ...
224- ... def g (self ): pass
225- ...
226- ... @ classmethod
227- ... async def h (cls ): pass
228- ...
229- ... global outer
230- ... def outer (self ): pass
231- ... ''' , 'test', 'exec')
232- >>> class_A = st.get_children()[2 ]
233- >>> class_A.get_methods()
234- ('f', 'g', 'h')
235-
236- Although ``A().f() `` raises :exc: `TypeError ` at runtime, ``A.f `` is still
237- considered as a method-like function.
238-
239- .. deprecated-removed :: 3.14 3.16
240-
241190
242191.. class :: Symbol
243192
0 commit comments