diff --git a/homeworks/10-==.md b/homeworks/10-==.md index 917e28e..da0f1e4 100644 --- a/homeworks/10-==.md +++ b/homeworks/10-==.md @@ -5,5 +5,14 @@ - Байткод `IS_OP`: https://docs.python.org/3/library/dis.html#opcode-IS_OP - Как работают сравнения в Python? https://docs.python.org/3/reference/datamodel.html#object.__eq__ - `functools.total_ordering`: https://docs.python.org/3/library/functools.html#functools.total_ordering +- `functools.cmp_to_key`: https://docs.python.org/3/library/functools.html#functools.cmp_to_key - `@dataclass(eq=True, order=True)`: https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass - `ast.Compare`: https://docs.python.org/3/library/ast.html#ast.Compare + +Другие статьи: +- https://snarky.ca/unravelling-rich-comparison-operators/ +- https://snarky.ca/unravelling-is-and-is-not/ + +Жесть: +- `PyObject_RichCompare`: https://docs.python.org/3/c-api/object.html#c.PyObject_RichCompare +- `tp_richcompare`: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_richcompare и https://docs.python.org/3/c-api/typeobj.html#c.richcmpfunc