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 function DeprecationWarnings below.

Version: 22.04.02

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. |
DeprecationWarnings() Have any `DeprecationWarning`s been reported or raised? |

Variables
| __all__ = `_ALL_LAZY.props`

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.

### DeprecationWarnings() |
Have any `DeprecationWarning`s been reported or raised? Returns: The number of `DeprecationWarning`s (`int`) so far or `None` if not enabled. Note: To get `DeprecationWarning`s if any, run `python` with env var `PYGEODESY_WARNINGS` set to a non-empty string AND use `python[3]` command line option `-X dev`, `-W always` or `-W error`, etc.