Fork me on GitHub"

# skbio.util.classproperty

class skbio.util.classproperty(func)

  Decorator for class-level properties.

  Supports read access only. The property will be read-only within an instance. However, the property can always be redefined on the class, since Python classes are mutable.

  Parameters:

    func (function) – Method to make a class property.

  Returns:

    Decorated method.

  Return type:

    property

  Raises:

    AttributeError – If the property is set on an instance.

  Attributes

  `fdel` |
  `fget` |
  `fset` |

  Built-ins

  `__delete__`(instance, /) | Delete an attribute of instance.
  `__get__`(cls, owner) | Return an attribute of instance, which is of type owner.
  `__getstate__`() | Helper for pickle.
  `__hash__`() | Return hash(self).
  `__set__`(obj, value) | Set an attribute of instance to value.
  `__set_name__` | Method to set name of a property.

  Methods

  `deleter` | Descriptor to obtain a copy of the property with a different deleter.
  `getter` | Descriptor to obtain a copy of the property with a different getter.
  `setter` | Descriptor to obtain a copy of the property with a different setter.