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

# Module props

Mutable, immutable and caching/memoizing properties and deprecation decorators.

To enable `DeprecationWarning`s from `PyGeodesy`, set env var `PYGEODESY_WARNINGS` to a non-empty string AND run `python` with command line option `-X dev` or with one of the `-W` choices, see callable DeprecationWarnings below.

Version: 23.08.23

Classes
| Property_RO
| Property
| property_RO

Functions
property_doc_(doc) Decorator for a standard `property` with basic documentation. |
deprecated_class(cls_or_class) Use inside __new__ or __init__ of a DEPRECATED class. |
deprecated_function(call) Decorator for a DEPRECATED function. |
deprecated_method(call) Decorator for a DEPRECATED method. |
deprecated_Property_RO(method) Decorator for a DEPRECATED Property_RO. |
deprecated_property_RO(method) Decorator for a DEPRECATED property_RO. |

Variables
| __all__ = `_ALL_LAZY.props`
| DeprecationWarnings = `DeprecationWarnings()`

Function Details

### property_doc_ (doc) |
Decorator for a standard `property` with basic documentation. Arguments: `doc` - The property documentation (`str`). Example:
    >>> @property_doc_("documentation text.")
    >>> def name(self):
    >>>     ...
    >>>
    >>> @name.setter
    >>> def name(self, value):
    >>>     ...

### deprecated_class (cls_or_class) |
Use inside __new__ or __init__ of a DEPRECATED class. Arguments: `cls_or_class` - The class (`cls` or `Class`). Note: NOT a decorator!

### deprecated_function (call) |
Decorator for a DEPRECATED function. Arguments: `call` - The deprecated function (`callable`). Returns: The `call` DEPRECATED.

### deprecated_method (call) |
Decorator for a DEPRECATED method. Arguments: `call` - The deprecated method (`callable`). Returns: The `call` DEPRECATED.

### deprecated_Property_RO (method) |
Decorator for a DEPRECATED Property_RO. Arguments: `method` - The `Property_RO.fget` method (`callable`). Returns: The `method` DEPRECATED.

### deprecated_property_RO (method) |
Decorator for a DEPRECATED property_RO. Arguments: `method` - The `property_RO.fget` method (`callable`). Returns: The `method` DEPRECATED.