|
@@ -2,6 +2,13 @@
|
|
|
|
|
|
Just notes on various things
|
|
|
|
|
|
+## Magic Methods
|
|
|
+Classes have certain magic methods that help make objects behave in pythonlike ways.
|
|
|
+
|
|
|
+* `__repr__` returns a string representation of the object. Should be unambiguous. (i.e. add parameters).
|
|
|
+* `__str__` returns a string representation of the object. Should be easily readable but not necessarily
|
|
|
+ unambiguous. Careful, can be confused with `__repr__` in some cases.
|
|
|
+
|
|
|
## docstrings
|
|
|
Use 'em.
|
|
|
|