© Kristian Rother 2017

Kristian Rother, Pro Python Best Practices, 10.1007/978-1-4842-2241-6_6

6. Debugging with Introspection Functions

Kristian Rother

(1)Berlin, Germany

Insufficient facts always invite danger.

—Leonard Nimoy as Spock, Star Trek, season 1, episode 24

Over the first few chapters we have written a lot of functions that we can now start assembling. When using Python functions or modules, we are frequently faced with questions like “Where did I put the function for ..?”, “What does that function return?”, or “What is in this module?” All these questions can be answered with Introspection. Introspection in Python refers to a group of powerful functions that allow you to examine objects in detail. The detailed information provided makes ...

Get Pro Python Best Practices: Debugging, Testing and Maintenance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.