# Path: infi/pyutils/functors/functor.py
# class Functor(object):
#     def __call__(self, *args, **kwargs):
#         raise NotImplementedError()
# 
# Path: infi/pyutils/functors/always.py
# class Always(Functor):
#     def __init__(self, value):
#         super(Always, self).__init__()
#         self._value = value
#     def __call__(self, *args, **kwargs):
#         return self._value
#     def __repr__(self):
#         return "<Always {0!r}>".format(self._value)
# 
# Path: infi/pyutils/python_compat.py
# _PYTHON_VERSION = platform.python_version()
# _IS_PYTHON_3 = _PYTHON_VERSION >= '3'
# _IS_BELOW_PYTHON_2_7 = _PYTHON_VERSION < '2.7'
# def get_underlying_function(f):
# def _get_underlying_classmethod_function(f):
#     def create_bound_method(func, self):
#     class TemporaryClass(object):


import operator
import functools
from .functors.functor import Functor
from .functors.always import Always
from .python_compat import iteritems
        return "<is {0!r}>".format(self._obj)

class Equality(Predicate):
    def __init__(self, obj):
        super(Equality, self).__init__(functools.partial(operator.eq, obj))
        self._obj = obj
    def __repr__(self):
        return "< == {0!r}>".format(self._obj)

class _MISSING(object):
    pass

class ObjectAttributes(Predicate):
    def __init__(self, **attributes):
        super(ObjectAttributes, self).__init__()
        self._attributes = attributes
    def __call__(self, obj):
        return all(getattr(obj, attr, _MISSING) == value for attr, value in iteritems(self._attributes))
    def __repr__(self):
        return "<{0}>".format(
            ", ".join(
                ".{0}=={1!r}".format(attr, value) for attr, value in iteritems(self._attributes)
                )
            )

class DictionaryItems(Predicate):
    def __init__(self, **items):
        super(DictionaryItems, self).__init__()
        self._items = items
    def __call__(self, obj):

# Path: infi/pyutils/functors/functor.py
# class Functor(object):
#     def __call__(self, *args, **kwargs):
#         raise NotImplementedError()
# 
# Path: infi/pyutils/functors/always.py
# class Always(Functor):
#     def __init__(self, value):
#         super(Always, self).__init__()
#         self._value = value
#     def __call__(self, *args, **kwargs):
#         return self._value
#     def __repr__(self):
#         return "<Always {0!r}>".format(self._value)
# 
# Path: infi/pyutils/python_compat.py
# _PYTHON_VERSION = platform.python_version()
# _IS_PYTHON_3 = _PYTHON_VERSION >= '3'
# _IS_BELOW_PYTHON_2_7 = _PYTHON_VERSION < '2.7'
# def get_underlying_function(f):
# def _get_underlying_classmethod_function(f):
#     def create_bound_method(func, self):
#     class TemporaryClass(object):


# Path: infi/pyutils/predicates.py
import operator
import functools
from .functors.functor import Functor
from .functors.always import Always
from .python_compat import iteritems

        return "<is {0!r}>".format(self._obj)

class Equality(Predicate):
    def __init__(self, obj):
        super(Equality, self).__init__(functools.partial(operator.eq, obj))
        self._obj = obj
    def __repr__(self):
        return "< == {0!r}>".format(self._obj)

class _MISSING(object):
    pass

class ObjectAttributes(Predicate):
    def __init__(self, **attributes):
        super(ObjectAttributes, self).__init__()
        self._attributes = attributes
    def __call__(self, obj):
        return all(getattr(obj, attr, _MISSING) == value for attr, value in iteritems(self._attributes))
    def __repr__(self):
        return "<{0}>".format(
            ", ".join(
                ".{0}=={1!r}".format(attr, value) for attr, value in iteritems(self._attributes)
                )
            )

class DictionaryItems(Predicate):
    def __init__(self, **items):
        super(DictionaryItems, self).__init__()
        self._items = items
    def __call__(self, obj):

        for (attr, value) in iteritems(self._items):