xoa.misc.Choices¶
- class xoa.misc.Choices(choices, case_insensitive=True, parameter=None, description='Choices')[source]¶
Choice management for a function or method parameter
- Parameters
choices (dict, list) – Allowed choices. When a dict, values are considered as the description of choices.
case_insensitive (bool) – Wether the treatment of string type choice should be case sensitive or not.
parameter (None, str) – Parameter name, which defaults to the lower case class name
description (str) – Short description of the parameter.
- __init__(choices, case_insensitive=True, parameter=None, description='Choices')[source]¶
Initialize self. See help(type(self)) for accurate signature.
Methods
format_method_docstring(func)to_docstring([indent])Convert to numpy-like docstring
Attributes