cycler.cycler¶
- cycler.cycler(arg:Cycler[K,V])→Cycler[K,V][source]¶
- cycler.cycler(**kwargs:Iterable[V])→Cycler[str,V]
- cycler.cycler(label:K,itr:Iterable[V])→Cycler[K,V]
Create a new
Cyclerobject from a single positional argument,a pair of positional arguments, or the combination of keyword arguments.cycler(arg)cycler(label1=itr1[, label2=iter2[, …]])cycler(label, itr)
Form 1 simply copies a given
Cyclerobject.Form 2 composes a
Cycleras an inner product of thepairs of keyword arguments. In other words, all of theiterables are cycled simultaneously, as if through zip().Form 3 creates a
Cyclerfrom a label and an iterable.This is useful for when the label cannot be a keyword argument(e.g., an integer or a name that has a space in it).- Parameters:
- argCycler
Copy constructor for Cycler (does a shallow copy of iterables).
- labelname
The property key. In the 2-arg form of the function,the label can be any hashable object. In the keyword argumentform of the function, it must be a valid python identifier.
- itriterable
Finite length iterable of the property values.Can be a single-property
Cyclerthat wouldbe like a key change, but as a shallow copy.
- Returns:
- cyclerCycler
New
Cyclerfor the given property