MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / is_variable

Function is_variable

monai/utils/component_store.py:23–25  ·  view source on GitHub ↗

Returns True if `name` is a valid Python variable name and also not a keyword.

(name)

Source from the content-addressed store, hash-verified

21
22
23def is_variable(name):
24 """Returns True if `name` is a valid Python variable name and also not a keyword."""
25 return name.isidentifier() and not iskeyword(name)
26
27
28class ComponentStore:

Callers 1

addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…