Core Python: Introspection

In this course, you'll look at Python's support for introspection, the ability to examine objects, types, and program state at runtime. While not needed in every program, introspection can be the key to elegant designs and debugging complex problems.
Course info
Rating
(16)
Level
Intermediate
Updated
May 13, 2020
Duration
30m
Table of contents
Description
Course info
Rating
(16)
Level
Intermediate
Updated
May 13, 2020
Duration
30m
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.

About the author
About the author

Robert Smallshire is a founding director of Sixty North, a software product and consulting business in based in Norway. He has held several senior software architecture and technical management roles, and he is a regular conference speaker. Python is his weapon of choice.

More from the author
Core Python: Robust Resource and Error Handling
Intermediate
1h 14m
Jun 29, 2020
Core Python: Classes and Object-orientation
Intermediate
2h 54m
Jun 2, 2020
More courses by Robert Smallshire
About the author

Austin is a founding director of Sixty North, a software consulting, training, and application development company. He's a native of Texas but currently lives in Norway where he writes software, runs a local software interest group, and presents and teaches whenever he can.

More from the author
The Future of Python
Beginner
45m
Sep 3, 2020
Core Python: Robust Resource and Error Handling
Intermediate
1h 14m
Jun 29, 2020
More courses by Austin Bingham
Section Introduction Transcripts
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.