~/talk

Python 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods

Talkat EuroPython 2011 · 2011-06-20..06-26· [python]
links:none on file
slides:none on file

Explains concrete internals: objects are labels on values, reference counting plus a cycle detector, and small integers are -5 to 256 interned so identity surprises happen; mutable vs immutable drives bugs (aliases vs copies), use copy.deepcopy for true deep copies but it’s seldom needed. Shows a Time60 class with __str__ and __add__ (handles base‑60 carry), demos using timeit to spot costly repeated calls, describes list growth/shrink allocation strategy and recommends deque for heavy front inserts. Also warns against __del__ and shows a text‑to‑PowerPoint script built and used.

AI-written summary · about

  1. 0:00Intro
  2. 2:22About this talk & you
  3. 3:55How to Create a Class
  4. 6:46Function/Method Evaluation
  5. 11:23More About Class Instances
  6. 13:44How to Create a Subclass
  7. 22:26Python Type Emulation
  8. 23:24Special Class Methods
  9. 33:50Overriding Special Methods
  10. 37:10Stack Utilization During Execution
  11. 38:48The Stack and Execution Speed
  12. 46:08Introduction to Python Objects
  13. 47:51Objects and References
  14. 50:53Reference Count Increased
  15. 53:34Reference Count Decreased
  16. 54:18Categorizing the Standard Types
  17. 56:27Storage Model
  18. 56:54Update Model
  19. 57:54Access Model
  20. 58:35Type Categorization Summary
  21. 59:14Objects & References Quiz
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.