Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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