- Destructors in Python are not guaranteed to run.
__del__
(finalizer; when garbage collector garbage collects)
- Duck Typing: if an object has the requested method, a call to it will just work
- “If it quacks like a duck, then it must be a duck”
- Checking if not
None
, obj is not None
arr += [9]
is the same as arr.append(9)
, but not the same as arr = arr + [9]
- Dictionaries have a separate array that keeps track of insertion order