Page Body

All the Ways to Introspect Python Objects at Runtime

Martin Heinz:

Python provides a lot of ways to ask questions about your code. Whether it's basic things like help() function, builtin functions like dir() or more advanced methods in inspect module - the tools are there to help you find the answers to your questions.

Let's find out what kinds of questions about our own code can Python answer for us and how it can help us during debugging sessions, dealing with type annotations, validating inputs and much more.

Enjoyed this post?

Subscribe to the feed for the latest updates.