Core Python: Introspection
By Robert Smallshire and Austin Bingham
Course info



Course info



Description
Python is a highly dynamic language, and this dynamism is enabled by a great deal of metadata associated with objects at runtime. In this course, Core Python: Introspection, you'll explore Python's support for introspection, the ability of a program to examine - and even modify - its own structure and state through this metadata.
First, you'll look at introspection as the key to elegant designs or debugging complex problems. Then, you'll be introduced to Python’s facilities for introspecting live programs. Finally, you'll learn how to examine objects, types, and program state at runtime. By the end of this course you’ll know how to query objects for their attributes and inspect program state, and you’ll have a deeper knowledge of how Python programs are arranged internally.
Section Introduction Transcripts
Course Overview
Hi, everyone. My name is Austin Bingham, and welcome to my course, Core Python: Introspection. I'm a founder and principal consultant at Sixty North. Python is a highly‑dynamic language, and this dynamism is enabled by a great deal of metadata associated with objects at runtime. Coupled with this, Python provides excellent support for introspection, the ability of a program to examine and even modify its own structure and state. In the hands of a skilled programmer, introspection can be the key to elegant designs or debugging complex problems. In this course, we'll introduce you to Python's facilities for introspecting live programs. Some of the major topics we'll cover include introspecting type information, introspecting objects, introspecting scopes, Python's standard library "inspect" module, applying these concepts to build useful tools. By the end of this course, you'll know how to query objects for their attributes and inspect program state, and you'll have a deeper knowledge of how Python programs are arranged internally. Before beginning this course, students should be familiar with the essentials of the Python language, including functions, classes, and modules. This course assumes knowledge of these topics equivalent to what's presented in Core Python: Getting Started. I hope you'll join me in this journey to learn more about introspection in Python with the Core Python: Introspection course, at Pluralsight.