Introducing built-in functions
To understand introspection and the usage of Python’s built-in functions to perform introspection, we will continue making use of our core example of ABC Megamart throughout this chapter.
We will be covering the usage of the following built-in functions to introspect Python objects:
id()
eval()
callable()
hastattr()
getattr()
isinstance()
issubclass()
property()
Introspecting Python objects helps in understanding the properties of objects, which in turn, helps in metaprogramming these objects and using them to debug the objects, which we will be looking at in further chapters as well.
With this understanding, let’s look further into the concept of how to use these built-in functions and introspect objects.