Pointers and Objects in Python

Austin Cepalia

If you’ve ever worked with lower-level languages like C or C++, then you may have heard of pointers. Pointers are essentially variables that hold the memory address of another variable. They allow you to create great efficiency in parts of your code but can lead to various memory management bugs.

You’ll learn about Python’s object model and see why pointers in Python don’t really exist. For the cases where you need to mimic pointer behavior, you’ll learn ways to simulate pointers in Python without managing memory.

In this course, you’ll:

  • Learn why pointers in Python don’t exist
  • Explore the difference between C variables and Python names
  • Simulate pointers in Python
  • Experiment with real pointers using ctypes

What’s Included:

Downloadable Resources:

About Austin Cepalia

Austin is a video tutorial author at Real Python. He's currently a student working towards a degree in computer science at Rochester Institute of Technology.

» More about Austin

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for Mark

Mark on Sept. 11, 2021

Great course, Austin. I’ve watched it three times to drill it in, and just wanted to drop a comment saying you’re a good teacher. All writers here on Real Python strike me as good, but I found you stood out. I’ll be looking for content from you in the future. I just felt compelled to pat you on the back for this course. Good job!

Avatar image for Ghani

Ghani on Oct. 18, 2020

Very informative and clear; thank you so much!

« Browse All Courses