Debian Codegraph @

cytoolz/curried/operator.py

raw
1 import operator
2
3 from cytoolz.functoolz import curry
4
5
6 # Tests will catch if/when this needs updated
7 IGNORE = {
8 "__abs__", "__index__", "__inv__", "__invert__", "__neg__", "__not__",
9 "__pos__", "_abs", "abs", "attrgetter", "index", "inv", "invert",
10 "is_none", "is_not_none", "itemgetter", "neg", "not_", "pos", "truth"
11 }
12
13 locals().update(
14 {name: f if name in IGNORE else curry(f)
15 for name, f in vars(operator).items() if callable(f)}
16 )
17
18 # Clean up the namespace.
19 del curry
20 del operator