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
Return current amount of counts.
Initial value for the counter.
Methods
Attributes#
- Counter.counts#
Return current amount of counts.
- Counter.initial_value#
Initial value for the counter.
Methods#
Methods documentation
- Counter.__call__(*args, **kwargs)#
Increase
countsby 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.