Parameter¶
- class metpy.units.Parameter(name, kind, *, default, annotation)[source]¶
Represents a parameter in a function signature.
Has the following public attributes:
- namestr
The name of the parameter as a string.
- defaultobject
The default value for the parameter if specified. If the parameter has no default value, this attribute is set to
Parameter.empty
.
- annotation
The annotation for the parameter if specified. If the parameter has no annotation, this attribute is set to
Parameter.empty
.
- kindstr
Describes how argument values are bound to the parameter. Possible values:
Parameter.POSITIONAL_ONLY
,Parameter.POSITIONAL_OR_KEYWORD
,Parameter.VAR_POSITIONAL
,Parameter.KEYWORD_ONLY
,Parameter.VAR_KEYWORD
.
Attributes Summary
Methods Summary
__init__
(name, kind, *, default, annotation)replace
(*[, name, kind, annotation, default])Creates a customized copy of the Parameter.
Attributes Documentation
- KEYWORD_ONLY = 3¶
- POSITIONAL_ONLY = 0¶
- POSITIONAL_OR_KEYWORD = 1¶
- VAR_KEYWORD = 4¶
- VAR_POSITIONAL = 2¶
- annotation¶
- default¶
- kind¶
- name¶
Methods Documentation