import symtable
st = symtable.symtable("""
class X:
class Nested: pass
type Alias = int
x = (x for x in range(10))
y = filter(lambda z: z % 2, range(10))
""", "mod", "exec")
cls = st.get_children()[0]
print(cls.get_methods())
('Nested', 'Alias', 'genexpr', 'lambda')
None of these are methods.