Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/toolz/curried/operator.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

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