API: AdvancedProperty

class advanced_descriptors.AdvancedProperty(property)[source]

Advanced property main entry point.

New in version 2.1.0: Inherit property

__init__(fget=None, fset=None, fdel=None, fcget=None)[source]
Parameters:
  • fget (typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]) – normal getter.
  • fset (typing.Optional[typing.Callable[[typing.Any, typing.Any], None]]) – normal setter.
  • fdel (typing.Optional[typing.Callable[[typing.Any, ], None]]) – normal deleter.
  • fcget (typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]) – class getter. Used as normal, if normal is None.

Note

doc argument is not supported due to class wide getter usage.

getter(fget)

Descriptor to change the getter on a property.

Parameters:fget (typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]) – new normal getter.
Return type:AdvancedProperty
setter(fset)

Descriptor to change the setter on a property.

Parameters:fset (typing.Optional[typing.Callable[[typing.Any, typing.Any], None]]) – new setter.
Return type:AdvancedProperty
deleter(fdel)

Descriptor to change the deleter on a property.

Parameters:fdel (typing.Optional[typing.Callable[[typing.Any, ], None]]) – New deleter.
Return type:AdvancedProperty
cgetter(fcget)[source]

Descriptor to change the class wide getter on a property.

Parameters:fcget (typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]) – new class-wide getter.
Return type:AdvancedProperty
fget

typing.Optional[typing.Callable[[typing.Any, ], typing.Any]] Getter instance.

fset

typing.Optional[typing.Callable[[typing.Any, typing.Any], None]] Setter instance.

fdel

typing.Optional[typing.Callable[[typing.Any, ], None]] Deleter instance.

fcget

typing.Optional[typing.Callable[[typing.Any, ], typing.Any]] Class wide getter instance.