Elementwise provides convenient, fully lazy, abstract programming behavior for interacting with iterable objects. All attempts at attribute access on OperationProxy objects return generator factories wrapped in OperationProxy objects. This means that you can generatively build up complex operation chains and apply these chains of operations repeatedly, to different source iterables. Additionally, each OperationProxy object has a reference to its parent OperationProxy, allowing you to traverse up the function tree, undoing operations or modying previous processes.
Elementwise provides three proxy objects:
This treats the arguments of all operations performed as iterables which emit the correct argument value for the operation on the element from the proxied iterable with the same index. For example:
>>> PairwiseProxy([1, 2, 3, 4]) + [1, 2, 3, 4]
PairwiseProxy([2, 4, 6, 8])
Each of the proxy objects can mutate into any of the other types by calling a mutator method.
mutates the current proxy into an ElementwiseProxy.
mutates the current proxy into a PairwiseProxy.
mutates the current proxy into a RecursiveElementwiseProxy.
When you would like to perform the operation chain represented by your proxy, simply iterate over it. The easiest way to do this is probably to call list with the proxy as the argument.
If you would like to perform the same operation chain on another iterable, all OperationProxy subclasses support OperationProxy.replicate() which takes an iterable and generates a new chain, which is a duplicate of the current chain with that iterable as the base data source.
If for some reason you would like to undo an operation, all OperationProxy subclasses support OperationProxy.undo(), which accepts an integer number of operations that should be undone (defaulting to 1) and returns a reference to the OperationProxy representing that step in the chain.
Note
There are some exceptions to the broadcasting behavior that can not be circumvented. This includes most methods uesd by builtin types that were formerly functions, such as __str__ and __nonzero__. When you need to broadcast these operations, use ElementwiseProxy.apply().
Provides elementwise operator behavior, attribute access and method calls over a parent iterable.
First, create an ElementwiseProxy from any iterable, like so:
nums = ElementwiseProxy([1, 2, 3, 4])
You can perform a large vareity of operations on the proxy, and it will create a chain of operations to be applied to the contents of the iterable being proxied. The proxy is fully lazy, so none of the operations will be applied until you begin to request values from the proxy by iterating over it.
For example:
>>> print nums.bit_length()
1, 2, 2, 3
>>> nums + 1
2, 3, 4, 5
>>> print nums * 2
2, 4, 6, 8
>>> print nums == 2
False, True, False, False
>>> print ((nums + 1) * 2 + 3).apply(float)
7.0, 9.0, 11.0, 13.0
>>> print (nums.apply(float) + 0.0001).apply(round, 2)
1.0, 2.0, 3.0, 4.0
>>> print abs(nums - 3)
2, 1, 0, 1
>>> print (nums * 2 + 3) / 4
>>> list(efoo2.undo(3))
1, 2, 3, 4
>>> print ((nums * 2 + 3) / 4).replicate([2, 2, 3, 3])
1, 1, 2, 2
>>> words = ElementwiseProxy(["one", "two", "three", "four"])
>>> print (words + " little indians").upper().split(" ").apply(reversed).apply("_".join) * 2
'INDIANS_LITTLE_ONEINDIANS_LITTLE_ONE', 'INDIANS_LITTLE_TWOINDIANS_LITTLE_TWO', 'INDIANS_LITTLE_THREEINDIANS_LITTLE_THREE', 'INDIANS_LITTLE_FOURINDIANS_LITTLE_FOUR'
Returns: | A function which returns:(e + other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e & other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e(*args, **kwargs) for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(cmp(e, other) for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(item in e for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e / other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(divmod(e, other) for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e == other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e // other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e >= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e > other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e |= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e &= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e /= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e //= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e <<= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e %= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e *= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e |= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e **= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e >>= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e -= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e |= other for e in self)
using truediv. |
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e =^ other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:(e <= other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e << other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e < other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e % other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e * other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e != other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e | other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(pow(e, other, modulo) for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other + e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other & e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other / e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(divmod(other, e) for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other // e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other << e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e % other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other * e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other | e for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(pow(other, e) for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other >> e for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e >> other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other - e for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other / e for e in self)
using truediv. |
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(other ^ e for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e - other for e in self).
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:(e / other for e in self), using truediv.
|
---|---|
Return type: | FunctionType -> GeneratorType |
Provides iterable objects with a proxy that broadcasts operations to member elements.
This is a simple proxy object for iterators, which provides a few extra features:
Respect the getitem attribute on the parent if it exists. Otherwise, try to use itertools.islice.
If the underlying iterable is cacheable and the cache has been built up, the cache will be iterated over. Otherwise the underlying iterable will be iterated over.
If other is an integer, return the cartesian product of self repeated other times. Otherwise, return the cartiasn product of self and other
list of weak references to the object (if defined)
Base class for Proxy objects.
list of weak references to the object (if defined)
Provides pairwise operator behavior, attribute access and method calls over a parent iterable.
First, create an PairProxy from any iterable, like so:
nums = PairwiseProxy([1, 2, 3, 4])
You can perform a large vareity of operations on the proxy, and it will create a chain of operations to be applied to the contents of the iterable being proxied. The proxy is completely lazy, so none of the operations will be applied until you begin to request values from the proxy by iterating over it.
For example:
>>> nums + [1, 2, 3, 4]
2, 4, 6, 8
>>> nums * [2, 2, 3, 3]
2, 4, 9, 12
>>> nums == [2, 2, 3, 5]
False, True, True, False
>>> (nums.apply(float) / itertools.count(2) + itertools.count(1)).apply(round, args=itertools.repeat([2]))
1.5, 2.67, 3.75, 4.8
>>> abs(nums - [3, 2, 1, 1])
2, 0, 2, 3
>>> (nums * [2, 2, 1, 5] + [3, 5, 9, 0]) / [4, 1, 2, 3]
1, 9, 6, 6
>>> ((nums * itertools.repeat(2) + itertools.repeat(3)) / itertools.repeat(4)).replicate([2, 2, 3, 3])
1, 0, 0, 0
>>> ((nums * [2, 3, 4, 5]) > [5, 6, 7, 8]) != [True, True, False, True]
True, True, True, False
Returns: | A function which returns:imap(lambda x, y: x + y, self, other)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x & y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: |
|
---|---|
Returns: | A function which returns: imap(self, self, args, kwargs)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(cmp, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y in x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x / y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x % y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x == y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x // y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y / x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x > y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x += y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x &= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x /= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x // y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x <<= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x % y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x *= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x |= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: pow(x, y, modulo), self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x >>= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x -= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x /= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:imap(lambda x, y: x ^= y, self, other)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x <= y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x << y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x < y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x % y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x * y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x != y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x | y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | others (Sequence) – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x + y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y + x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y & x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y / x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: divmod(y, x), self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y // x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y << x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y % x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y * x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y | x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y ** x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y >> x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x >> y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y - x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y / x, self, other)
using truediv. |
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: y ^ x, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x - y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x / y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: | other – The other object to use for each element of the PairwiseProxy |
---|---|
Returns: | A function which returns:imap(lambda x, y: x ^ y, self, other)
|
Return type: | FunctionType -> GeneratorType |
Parameters: |
|
---|---|
Returns: | A function which returns: imap(func, self, args, kwargs)
|
Return type: | FunctionType -> GeneratorType |
Provides iterable objects with a proxy that performs pairwise operations using elements of supplied iterables.
Base class for Proxy Mixins.
list of weak references to the object (if defined)
Provides recursive elementwise operator behavior, attribute access and method calls over a parent iterable.
First, create an RecursiveElementwiseProxy from any iterable, like so:
treenums = RecursiveElementwiseProxy([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
Yyou can perform a large vareity of operations on the proxy, and it will create a chain of operations to be applied to the contents of the iterable being proxied. The proxy is fully lazy, so none of the operations will be applied until you begin to request values from the proxy by iterating over it.
For example:
>>> treenums + 1
((2, 3, 4), (5, 6, 7), (8, 9, 10))
>>> treenums * 2
((2, 4, 6), (8, 10, 12), (14, 16, 18))
>>> (treenums * 2 + 1).apply(float)
((3.0, 5.0, 7.0), (9.0, 11.0, 13.0), (15.0, 17.0, 19.0))
Returns: | A function which returns:graphmap(lambda e: e + other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e & other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e(*args, **kwargs), self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: cmp(e, other), self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: item in e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e / other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: divmod(e, other), self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e == other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e // other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e >= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e > other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e += other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e &= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e /= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e //= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: <<= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e %= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e *= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e |= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e **= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e >>= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e -= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e |= other, self)
using truediv. |
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e =^ other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Warning
For mutable types, this operations can not be undone once finalized.
Returns: | A function which returns:graphmap(lambda e: e <= other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e << other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e < other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e % other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e * other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e != other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e | other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: pow(e, other, modulo), self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other + e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other & e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other / e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: divmod(other, e), self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other // e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other << e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e % other for e in self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other * e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other | e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: pow(other, e), self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other >> e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e >> other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other - e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other / e, self)
using truediv. |
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: other ^ e, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e - other, self)
|
---|---|
Return type: | FunctionType -> GeneratorType |
Returns: | A function which returns:graphmap(lambda e: e / other, self)
using truediv. |
---|---|
Return type: | FunctionType -> GeneratorType |
Provides iterable objects with a proxy that broadcasts operations recursively to member elements.
Generate a string-like representation of iterable, using f. repr requires special case behavior, since the repr() of a string is enclosed in an additional set of quotes.
Parameters: |
|
---|
Cacheable functions have their return iterable wrapped in an IterableProxy. If self.__cacheable__ evaluates to True, the IterableProxy will cache results as it is iterated over.
Chainable functions should return an instance of their class, with a reference to their parent function.
Parameters: |
|
---|