MCPcopy Index your code
hub / github.com/python/cpython / is_nested

Method is_nested

Lib/symtable.py:128–131  ·  view source on GitHub ↗

Return *True* if the block is a nested class or function.

(self)

Source from the content-addressed store, hash-verified

126 return bool(self._table.type == _symtable.TYPE_FUNCTION)
127
128 def is_nested(self):
129 """Return *True* if the block is a nested class
130 or function."""
131 return bool(self._table.nested)
132
133 def has_children(self):
134 """Return *True* if the block has nested namespaces.

Callers 6

print_symbolsFunction · 0.80
test_nestedMethod · 0.80
test_lambdaMethod · 0.80
test_nested_lambdaMethod · 0.80
test_genexprMethod · 0.80
test_nested_genexprMethod · 0.80

Calls

no outgoing calls

Tested by 5

test_nestedMethod · 0.64
test_lambdaMethod · 0.64
test_nested_lambdaMethod · 0.64
test_genexprMethod · 0.64
test_nested_genexprMethod · 0.64