1import operator
2
3from toolz.functoolz import curry
4
5
6# Tests will catch if/when this needs updated
7IGNORE = {
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}
12locals().update(
13 {name: f if name in IGNORE else curry(f)
14 for name, f in vars(operator).items() if callable(f)}
15)
16
17# Clean up the namespace.
18del IGNORE
19del curry
20del operator