inversion_ideas.utils.Counter#

class inversion_ideas.utils.Counter(initial_value=0)#

Simple counter callable class.

Count how many times the object gets called.

Parameters:
initial_valueint, optional

Initial value used in the counts.

Attributes

counts

Return current amount of counts.

initial_value

Initial value for the counter.

Methods

__call__(*args, **kwargs)

Increase counts by one.

reset()

Reset counter to the initial value.

Attributes#

Counter.counts#

Return current amount of counts.

Counter.initial_value#

Initial value for the counter.

Methods#

Methods documentation

Counter.__call__(*args, **kwargs)#

Increase counts by one.

Parameters:
*args

Position-based arguments that will be ignored.

**kwargs

Keyword arguments that will be ignored.


Counter.reset()#

Reset counter to the initial value.