Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0fa37cc
Add failing star tests
ForeverWintr Jul 16, 2017
1d3e7f3
Add more tests
ForeverWintr Jul 16, 2017
4097365
Fix order of operations in test
ForeverWintr Jul 16, 2017
51a6283
Add some documentation to FunctionMerge
ForeverWintr Jul 16, 2017
45a4b57
Partial implementation of BroadcastMerge
ForeverWintr Jul 16, 2017
c089e85
renamed: test_star.py -> test_broadcast.py
ForeverWintr Jul 16, 2017
f6a0ee0
Implement star loop test
ForeverWintr Jul 16, 2017
6b06a48
Make star upgrade regular functions
ForeverWintr Jul 16, 2017
e77ff24
Implement len_mismatch test
ForeverWintr Jul 20, 2017
88f92ff
Add some tests for the new star implementation
ForeverWintr Jul 23, 2017
fa85e7c
Clean up SimpleFunction __str__ by adding _name
ForeverWintr Jul 23, 2017
dc01315
Temporarily skip broadcast tests
ForeverWintr Jul 23, 2017
debcec2
Add more expected star str
ForeverWintr Jul 23, 2017
fe3c7d5
Merge branch 'dev' into new_star
ForeverWintr Jul 25, 2017
7f11b6e
Implement star decorator
ForeverWintr Jul 25, 2017
2802b83
Remove broadcast
ForeverWintr Jul 25, 2017
db9bd8a
WIP on converting broadcast to use star
ForeverWintr Jul 25, 2017
0eeefd1
Distribute old broadcast tests to correct modules
ForeverWintr Jul 26, 2017
eed294d
Remove BroadcastChain
ForeverWintr Jul 26, 2017
257410c
Convert test_broadcast_chain to test_at_operator
ForeverWintr Jul 26, 2017
a7f0b6d
Move broadcast tests to test_at_operator
ForeverWintr Jul 26, 2017
4a96b8e
Fix FunctionMerge tests
ForeverWintr Jul 26, 2017
7fea6b7
Extract iterator creation to its own method
ForeverWintr Jul 26, 2017
9883513
Fix star tests
ForeverWintr Jul 26, 2017
d61adb5
Update concurrent to __call__ like MergeFunc
ForeverWintr Jul 26, 2017
21a3869
Add some more test code
ForeverWintr Jul 26, 2017
6ede818
Coverage golf
ForeverWintr Jul 26, 2017
e26105d
Fix concurrent enumeration for order maintenance.
ForeverWintr Jul 26, 2017
38685ed
Actually fix the order error for real this time
ForeverWintr Jul 26, 2017
1c61911
Remove redundant `if call_state`
ForeverWintr Jul 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove BroadcastChain
  • Loading branch information
ForeverWintr committed Jul 26, 2017
commit eed294de124a7de52b3c6ad01d44a60612622bde
14 changes: 1 addition & 13 deletions metafunctions/core/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __matmul__(self, other):
@binary_operation
def __rmatmul__(self, other):
from metafunctions.util import star
return BroadcastChain.combine(other, star(self))
return FunctionChain.combine(other, star(self))


class FunctionChain(MetaFunction):
Expand Down Expand Up @@ -145,18 +145,6 @@ def combine(cls, *funcs):
return cls(*new_funcs)


class BroadcastChain(FunctionChain):
_function_join_str = '@'

@inject_call_state
def __call__(self, *args, **kwargs):
f_iter = iter(self._functions)
result = next(f_iter)(*args, **kwargs)
for f in f_iter:
result = f(*result, **kwargs)
return result


class FunctionMerge(MetaFunction):
_character_to_operator = {
'+': operator.add,
Expand Down