propy.func_property¶
-
propy.
func_property
(name, lookup=None)[source]¶ Creates a class property that is restricted to a callable object. To use, place the method within the class’s scope.
Parameters: - name : str
The name of the property to be created.
- lookup : dict
The dictionary used for lookups if the input value is not callable. If None, an exception will be raised if the object is not callable.
Examples
>>> class Class(): ... property1 = func_property('property1')