Memory Management in Python

3:40pm - 4:05pm on Saturday, October 6 in PennTop North

Theresa Lee

Audience Level:
Intermediate
Watch:
https://youtu.be/3pXquKQf2qk

Overview

Why does “a is b” evaluate to true if both variables are assigned to the integer 201 but not 498? When will Python still hold a reference to an object that has been deleted? How does Python’s garbage collection differ from other languages like Ruby? Learn all that and more in this talk.

Description

Do you understand how Python works under the hood? Can you explain the following?

Why does a is b evaluate to True when both variables have a value of 201? Why does the statement evaluate to False if they both have a value of 498? When will Python still hold a reference to an object that has been deleted? How does Python collect garbage and is it any different from other languages like Ruby?

Learn the answers to these questions and better understand concepts like interning, reference counting, reference cycles, and generational garbage collection in this talk.

Want to edit this page?