propy.bool_property¶
-
propy.
bool_property
(name)[source]¶ Creates a class property that has a boolean value input qualifier. To use, place the method within a class’s scope.
The values {True, ‘true’, ‘True’, ‘TRUE’, 1} will be interpreted as True when set to the property, while the values {False, ‘false’, ‘False’, ‘FALSE’, 0} will be interpreted as False. All other values will raise an exception.
Parameters: - name : str
The name of the property to be created.
Examples
>>> class Class(): ... bool1 = bool_property('bool1')