PyDocs

Nav

Python Language Services

Symbol.is_namespace

symtable

method of Symbol (source)
  • Symbol.is_namespace()
Returns *True* if name binding introduces new namespace.

If the name is used as the target of a function or class
statement, this will be true.

Note that a single name can be bound to multiple objects.  If
is_namespace() is true, the name may also be bound to other
objects, like an int or list, that does not introduce a new
namespace.
1 Example
>>> table = symtable.symtable("def some_func(): pass", "string", "exec")
>>> table.lookup("some_func").is_namespace()
True
from the Python docs
See Also
No see-alsos for symtable/Symbol.is_namespace
0 Notes
No notes for Symbol.is_namespace