An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:
An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:
Not everyone is a C or a Rust coder. In C, sending in a pointer, know it’s pass by reference, not pass by value.
In Python, depends if it’s immutable or mutable. Python coders eventually become hyper aware of the difference.
Python coders that want direct access to C libraries can use Cython CPython or ctypes. Probably missing a few options. Maybe others can chime in. This comes at the expense of much more complicated packaging.
Any package author that has underlying C code in their package automagically gains rock star status.