ParamMeta
This class serves as a metadata container for function parameters, storing their name, default value, and type annotation. It utilizes standard inspection constants to represent empty values and provides a structured way to manage parameter definitions.
Attributes
| Attribute | Type | Description |
|---|---|---|
| empty | Any = inspect.Parameter.empty | A sentinel value used to represent the absence of a default value or type annotation, sourced from inspect.Parameter.empty. |
| name | str | The identifier string representing the name of the parameter. |
| default | Any = inspect.Parameter.empty | The default value assigned to the parameter if no argument is provided during a call. |
| annotation | Any = inspect.Parameter.empty | The type hint or metadata associated with the parameter to define its expected data type. |
Constructor
Signature
def ParamMeta(
name: str,
default: Any = inspect.Parameter.empty,
annotation: Any = inspect.Parameter.empty
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| name | str | The name of the parameter. |
| default | Any = inspect.Parameter.empty | The default value of the parameter, if any. |
| annotation | Any = inspect.Parameter.empty | The type annotation of the parameter, if any. |
Signature
def ParamMeta(
name: str,
default: Any = inspect.Parameter.empty,
annotation: Any = inspect.Parameter.empty
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| name | str | The identifier of the parameter as defined in the function signature. |
| default | Any = inspect.Parameter.empty | The default value assigned to the parameter if no argument is provided by the caller. |
| annotation | Any = inspect.Parameter.empty | The type hint or metadata annotation associated with the parameter. |