# 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
        one object is less than or equal to another object.
    :param Optional[callable] gt: `callable` used to evaluate whether
        one object is greater than another object.
    :param Optional[callable] ge: `callable` used to evaluate whether
        one object is greater than or equal to another object.

    :param bool require_same_type: When `True`, equality and ordering methods
        will return `NotImplemented` if objects are not of the same type.

    :param Optional[str] class_name: Name of class. Defaults to 'Comparable'.

    See `comparison` for more details.

    .. versionadded:: 21.1.0
    """

    body = {
        "__slots__": ["value"],
        "__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)

# 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

        one object is less than or equal to another object.
    :param Optional[callable] gt: `callable` used to evaluate whether
        one object is greater than another object.
    :param Optional[callable] ge: `callable` used to evaluate whether
        one object is greater than or equal to another object.

    :param bool require_same_type: When `True`, equality and ordering methods
        will return `NotImplemented` if objects are not of the same type.

    :param Optional[str] class_name: Name of class. Defaults to 'Comparable'.

    See `comparison` for more details.

    .. versionadded:: 21.1.0
    """

    body = {
        "__slots__": ["value"],
        "__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()