Object Internals

Memory address in Python

Mridu Bhatnagar

Data-Structures Development Python 3

See in schedule Download/View Slides

This talk is intended to explain to participants what is happening under the hood when they are playing around with different python built-in data structures. Explain the concepts such that they are not surprised by the behavior of Python.

Pre-requisites:
Anyone who knows built-in python data structures like List, Dictionaries, set, etc.

Curiosity questions that the talk answers:
1. What happens to the memory address when * operator is used?
2. When does python create a new object in memory?
3. What does it refer to the mutability and immutability of objects in Python?
4. If the outer object is immutable but the reference objects are mutable. Can the elements be added?
5. What is the difference at the memory level when we refer to deep copy and shallow copy in lists?
6. Operations like List.sort and sorted in python? What to use, when to use? What happens at the memory level?
7. What is the difference between is vs ==? When should it be used?
8. Lots and lots of interesting examples.
9. How do we determine the memory reference id associated with the object?
10. Meaning of assigning a value to a variable in Python.

The existing slides use screenshots. But, I'll be including more interesting examples and would replace the screenshots with GIFs. So, that folks get a feeling of live coding and remain interested in the presentation. Along with the visual representation of what is happening at the memory level.

Type: Talk (30 mins); Python level: Intermediate; Domain level: Intermediate


Mridu Bhatnagar

Mridu is a developer. She enjoys converting ideas into working applications. She loves speaking at various conferences and meetups.