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

# Module props

Im-/mutable, caching or memoizing properties and deprecation decorators.

To enable `DeprecationWarning`s from `PyGeodesy`, set environment variable `PYGEODESY_WARNINGS` to a non-empty string and run `python` with command line option `-X dev` or one or the `-W` choices, see function DeprecationWarnings below.

Version: 21.06.09

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() Get the `DeprecationWarning`s 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() |
Get the `DeprecationWarning`s reported or raised. Returns: The number of `DeprecationWarning`s (`int`) or `None` if not enabled. Note: To get `DeprecationWarning`s if any, run `python` with environment variable `PYGEODESY_WARNINGS` set to a non-empty string AND use `python` command line option `-X dev`, `-W always`, or `-W error`, etc.