Package pycocoa :: Module utils :: Class module_property_RO
[frames] | no frames]

Class module_property_RO

object --+
         |
        module_property_RO

Decorator for a Read-Only module property.


Example:

>>> @module_property_RO
>>> def mp():  # no args
>>>     return ro  # singleton or other

See Also: Module Properties | the Proxy Pattern.

Instance Methods
 
__init__(self, func)
New module_property_RO.
 
__getattr__(self, name)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, func)
(Constructor)

 

New module_property_RO.

Parameters:
  • func - Function to be decorated as property (callable, invoked without args).
Overrides: object.__init__