Skip to main content

Mojo module

param_env

Deprecated: Use sys.defines instead.

This module provides backwards-compatible aliases for the functions that have been moved to sys.defines. The env_get_* functions have been renamed to get_defined_* to better reflect that they read compile-time defines (set via -D), not runtime environment variables.

Functions

  • env_get_bool: Try to get a boolean-valued define. Compilation fails if the name is not defined or the value is not a recognized boolean (True, False, 1, 0, on, off).
  • env_get_dtype: Try to get a DType-valued define. If the name is not defined, return a default value instead.
  • env_get_int: Try to get an integer-valued define. Compilation fails if the name is not defined.
  • env_get_string: Try to get a string-valued define. Compilation fails if the name is not defined.

Was this page helpful?