Package pygeodesy :: Module props :: Class Property |
[frames] | no frames]

# Class Property

    object --+
             |
      property --+
                 |
     _PropertyBase --+
                     |
           Property_RO --+
                         |
                        Property

Instance Methods
__init__(self, method) New mutable, caching `property` Factory to be used as `decorator`. |
setter(self, method) Make this `Property` mutable. |
Inherited from `_PropertyBase`: `deleter`, `getter` Inherited from `property`: `__delete__`, `__get__`, `__getattribute__`, `__new__`, `__set__` Inherited from `object`: `__delattr__`, `__format__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `property`: `fdel`, `fget`, `fset` Inherited from `object`: `__class__`

Method Details

### __init__ (self, method) (Constructor) |
New mutable, caching `property` Factory to be used as `decorator`. Arguments: `method` - The callable being decorated as this `property`'s getter, to be invoked only once. Overrides: object.__init__ Note: Like standard Python `property` without a setter, but with a more descriptive error message when set. See Also: Python 3's functools.cached_property and -.cache to memoize the property value., Luciano Ramalho, "Fluent Python", page 636, O'Reilly, 2016, "Coding a Property Factory", especially Example 19-24 and class Property.

### setter (self, method) |
Make this `Property` mutable. Arguments: `method` - The callable being decorated as this `Property`'s setter. Overrides: property.setter