diff --git a/README.md b/README.md index bfea0f8..9edb057 100644 --- a/README.md +++ b/README.md @@ -837,6 +837,8 @@ class : def get_class_name(cls): return cls.__name__ ``` +* **Return value of repr() should be unambiguous and of str() readable.** +* **If only repr() is defined, it will also be used for str().** ### Constructor Overloading ```python diff --git a/index.html b/index.html index 0d3beaa..def0d9c 100644 --- a/index.html +++ b/index.html @@ -798,6 +798,10 @@ creature = Creature(Point(0, def get_class_name(cls): return cls.__name__ +

Constructor Overloading

class <name>:
     def __init__(self, a=None):