# Path: src/attr/_compat.py
# def new_class(name, bases, kwds, exec_body):
#     """
#     A minimal stub of types.new_class that we need for make_class.
#     """
#     ns = {}
#     exec_body(ns)
# 
#     return type(name, bases, ns)
# 
# Path: src/attr/_make.py
# def _make_ne():
#     """
#     Create __ne__ method.
#     """
# 
#     def __ne__(self, other):
#         """
#         Check equality and either forward a NotImplemented or
#         return the result negated.
#         """
#         result = self.__eq__(other)
#         if result is NotImplemented:
#             return NotImplemented
# 
#         return not result
# 
#     return __ne__


import functools
from ._compat import new_class
from ._make import _make_ne
        "__init__": _make_init(),
        "_requirements": [],
        "_is_comparable_to": _is_comparable_to,
    }

    # Add operations.
    num_order_functions = 0
    has_eq_function = False

    if eq is not None:
        has_eq_function = True
        body["__eq__"] = _make_operator("eq", eq)
        body["__ne__"] = _make_ne()

    if lt is not None:
        num_order_functions += 1
        body["__lt__"] = _make_operator("lt", lt)

    if le is not None:
        num_order_functions += 1
        body["__le__"] = _make_operator("le", le)

    if gt is not None:
        num_order_functions += 1
        body["__gt__"] = _make_operator("gt", gt)

    if ge is not None:
        num_order_functions += 1
        body["__ge__"] = _make_operator("ge", ge)


# Path: src/attr/_compat.py
# def new_class(name, bases, kwds, exec_body):
#     """
#     A minimal stub of types.new_class that we need for make_class.
#     """
#     ns = {}
#     exec_body(ns)
# 
#     return type(name, bases, ns)
# 
# Path: src/attr/_make.py
# def _make_ne():
#     """
#     Create __ne__ method.
#     """
# 
#     def __ne__(self, other):
#         """
#         Check equality and either forward a NotImplemented or
#         return the result negated.
#         """
#         result = self.__eq__(other)
#         if result is NotImplemented:
#             return NotImplemented
# 
#         return not result
# 
#     return __ne__


# Path: src/attr/_cmp.py
import functools
from ._compat import new_class
from ._make import _make_ne

        "__init__": _make_init(),
        "_requirements": [],
        "_is_comparable_to": _is_comparable_to,
    }

    # Add operations.
    num_order_functions = 0
    has_eq_function = False

    if eq is not None:
        has_eq_function = True
        body["__eq__"] = _make_operator("eq", eq)
        body["__ne__"] = _make_ne()

    if lt is not None:
        num_order_functions += 1
        body["__lt__"] = _make_operator("lt", lt)

    if le is not None:
        num_order_functions += 1
        body["__le__"] = _make_operator("le", le)

    if gt is not None:
        num_order_functions += 1
        body["__gt__"] = _make_operator("gt", gt)

    if ge is not None:
        num_order_functions += 1
        body["__ge__"] = _make_operator("ge", ge)


    type_ = new_class(class_name, (object,), {}, lambda ns: ns.update(body))