diff --git a/README.md b/README.md index c5c45e7..7869e0d 100644 --- a/README.md +++ b/README.md @@ -1094,7 +1094,7 @@ Duck Types ### Comparable * **If eq() method is not overridden, it returns `'id(self) == id(other)'`, which is the same as `'self is other'`.** * **That means all objects compare not equal by default.** -* **Only the left side object has eq() method called, unless it returns NotImplemented, in which case the right object is consulted.** +* **Only the left side object has eq() method called, unless it returns NotImplemented, in which case the right object is consulted. False is returned if both return NotImplemented.** * **Ne() automatically works on any object that has eq() defined.** ```python diff --git a/index.html b/index.html index 69b329b..05fe4ed 100644 --- a/index.html +++ b/index.html @@ -923,7 +923,7 @@ Z = dataclasses.make_dataclass('Z', [

#Duck Types

A duck type is an implicit type that prescribes a set of special methods. Any object that has those methods defined is considered a member of that duck type.

Comparable

class MyComparable:
     def __init__(self, a):