Recent Posts

Python: Deep copy a compound object

2 minute read

Assignment statements in Python do not copy objects, they create bindings between a target and an object. For collections that are mutable or contain muta...

Python: Collect garbage

less than 1 minute read

If you have a variable with a large memory footprint, you can force garbage collection using the gc Garbage Collector module:

Python: Class inheritance

less than 1 minute read

You can check for class inheritance relationships with the issubclass() built-in: