MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / is_namespace

Method is_namespace

tools/python-3.11.9-amd64/Lib/symtable.py:289–300  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

287 return bool(self.__flags & DEF_LOCAL)
288
289 def is_namespace(self):
290 """Returns *True* if name binding introduces new namespace.
291
292 If the name is used as the target of a function or class
293 statement, this will be true.
294
295 Note that a single name can be bound to multiple objects. If
296 is_namespace() is true, the name may also be bound to other
297 objects, like an int or list, that does not introduce a new
298 namespace.
299 """
300 return bool(self.__namespaces)
301
302 def get_namespaces(self):
303 """Return a list of namespaces bound to this name"""

Callers 1

symtable.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected