Skip to content

Commit

Permalink
Merge pull request #501 from eriknw/no_compatibility
Browse files Browse the repository at this point in the history
Don't use compatibility module internally (it warns)
  • Loading branch information
eriknw authored Sep 24, 2020
2 parents fd342da + 0869f05 commit e9bc1e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions toolz/functoolz.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from functools import reduce, partial
import inspect
import operator
from operator import attrgetter
import sys
from operator import attrgetter, not_
from importlib import import_module
from textwrap import dedent
from types import MethodType

from .compatibility import PYPY
from .utils import no_default


__all__ = ('identity', 'apply', 'thread_first', 'thread_last', 'memoize',
'compose', 'compose_left', 'pipe', 'complement', 'juxt', 'do',
'curry', 'flip', 'excepts')

PYPY = hasattr(sys, 'pypy_version_info')


def identity(x):
""" Identity function. Return x
Expand Down Expand Up @@ -640,7 +641,7 @@ def complement(func):
>>> isodd(2)
False
"""
return compose(operator.not_, func)
return compose(not_, func)


class juxt(object):
Expand Down

0 comments on commit e9bc1e1

Please sign in to comment.