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