Python Memory Management and Tips Transcripts
Chapter: Course conclusion and review
Lecture: Take the red pill (AKA pointers)
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
We started our conversation talking about the simulation that you're living in. This beautiful, clean world that is making everything easy for you.
0:11
And we said, Look, if you really want to know how Python works and
0:14
how Python Memory Management works, you've got to look beyond this beautiful and handy facade that Python has put up for us.
0:22
We gotta take the red pill in Matrix nomenclature. So we took the red pill and we saw that even simple things like numbers, like
0:29
42, in Python are really PyObject pointers, specifically PyLongObject pointers, and there's a whole bunch of stuff happening behind the scenes,
0:41
even though there's this clean, simple programming language on top of it, that understand the mechanics of how it all works,
0:48
like for the fact that numbers are pointers and allocated on the heap and managed by
0:52
reference counting, we've got to look inside the CPython source code, which we did, and I gave you a bunch of short little links like,
0:59
for example "bit.ly/cPythonlong", where you can jump over and see the entire file of source code, here.