decorateme._over
Decorators for types that are “basically” a simpler type.
Module Contents
Functions
|
Auto-adds a |
|
Auto-adds an |
|
Auto-adds an |
|
Auto-adds an |
|
Auto-adds |
- decorateme._over.float_type(attribute: str)
Auto-adds a
__float__
using the__float__
of some attribute. Used to annotate a class as being “essentially an float”.- Parameters
attribute – The name of the attribute of this class
- decorateme._over.int_type(attribute: str)
Auto-adds an
__int__
using the__int__
of some attribute. Used to annotate a class as being “essentially an integer”.- Parameters
attribute – The name of the attribute of this class
- decorateme._over.iterable_over(attribute: str)
Auto-adds an
__iter__
over elements in an iterable attribute. Used to annotate a class as being “essentially an iterable” over some elements.- Parameters
attribute – The name of the attribute of this class
- decorateme._over.collection_over(attribute: str)
Auto-adds an
__iter__
and__len__
over elements in a collection attribute. Used to annotate a class as being “essentially a collection” over some elements.- Parameters
attribute – The name of the attribute of this class
- decorateme._over.sequence_over(attribute: str)
Auto-adds
__getitem__
and__len__
over elements in an iterable attribute. Used to annotate a class as being “essentially a list” over some elements.- Parameters
attribute – The name of the attribute of this class