diff --git a/special-method-names.html b/special-method-names.html index 4359bd0..86cc156 100644 --- a/special-method-names.html +++ b/special-method-names.html @@ -34,14 +34,14 @@ h3:before{counter-increment:h3;content:'B.' counter(h2) '.' counter(h3) '. '}
x = MyClass()
-x.__init__()
+x.__init__()
repr(x)
-x.__repr__()
+x.__repr__()
str(x)
+str(x)
x.__str__()
x.__bytes__()
format(x, format_spec)
-x.__format__(format_spec)
+format(x, format_spec)
+x.__format__(format_spec)
__init__() method is called after the instance is created. If you want to control the actual creation process, use the __new__() method.