#
DIFF.BLOG
New
Following
Discover
Jobs
More
Top Writers
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up
The home for great developer writing.
We surface the best developer writing from thousands of independent blogs, updated daily.
Join now
→
Learn more
TOPICS
Python: find all instances of a class with gc.get_objects()
122
·
Adamj
·
July 14, 2026, 8:22 p.m.
posts
Python
Python
Debugging
garbage-collection
software development
Summary
This post discusses a useful technique for debugging Python classes by utilizing the `gc.get_objects()` function to find live instances of a class, making it easier to analyze attributes or current states without altering the class itself.
Read full post on adamj.eu →
MORE POSTS LIKE THIS
pdb: Python's Built-in Debugger
Python Developer Tooling Handbook – pydevtools.com ·
Jul 13, 2026
Python
Debugging
How to Fix: ImportError: circular import (A Deep Dive)
Ahmed Nabil ·
Jun 17, 2026
Python Errors
Circular Import
Using LLMs to find Python C-extension bugs
Ankursethi ·
May 11, 2026
Python
C Extensions
How to Fix: AttributeError: ‘str’ object has no attribute ‘x’
Ahmed Nabil ·
Feb 28, 2026
Python Errors
AttributeError
From Python3.8 to Python3.10: Our Journey Through a Memory Leak
Lyft ·
Dec 15, 2025
Memory Leak
Python
Three releases, one new organization
Ned Batchelder ·
Nov 10, 2025
Python
Open Source
Discover more posts →
AUTHOR
RECENT POSTS FROM THE AUTHOR
Choose how you want to continue.
Continue with GitHub
Continue with Google