pcdsutils.profile.is_native
- pcdsutils.profile.is_native(obj: Any, module: ModuleType) bool[source]
Determines if obj was defined in module.
Returns True if obj was defined in this module. Returns False if obj was not defined in this module.
- Parameters:
- objAny
Any object. Note that if obj is a primitive type, or any other type without explicit references to its module, this check will fail.
- modulemodule
Any Python module
- Returns:
- nativebool
True if obj was defined in the module False otherwise
- Raises:
- TypeError
If the object type cannot be traced back to any particular module, e.g. a primitive type like int, or if the module argument cannot be interpreted as a module.