git://git.novaco.in
/
p2pool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
defer adding of weight dicts until solution is finalized
[p2pool.git]
/
p2pool
/
util
/
math.py
diff --git
a/p2pool/util/math.py
b/p2pool/util/math.py
index
66b802e
..
3cea2e4
100644
(file)
--- a/
p2pool/util/math.py
+++ b/
p2pool/util/math.py
@@
-130,6
+130,11
@@
def add_tuples(res, *tuples):
res = tuple(a + b for a, b in zip(res, t))
return res
+def flatten_linked_list(x):
+ while x is not None:
+ x, cur = x
+ yield cur
+
if __name__ == '__main__':
import random
a = 1