Core Python: Advanced Flow Control
By Robert Smallshire and Austin Bingham
Course info



Course info



Description
Complex flow control structures can be hard to write and harder to read. In this course, Core Python: Advanced Flow Control, you’ll learn to apply alternative techniques for flow control. First, you’ll explore loop-else clauses. Next, you’ll discover try-else clauses. Finally, you’ll learn how to perform mutli-way branching and leverage short-circuit evaluation. When you’re finished with this course, you’ll have the skills and knowledge of advanced Python flow control needed to create elegant, understandable, and fast programs.
Section Introduction Transcripts
Course Overview
Hi, everyone, I'm Rob Smallshire, and I'm here to welcome you to Core Python: Advanced Flow Control. My coauthor, Austin Bingham, and I are both founders and principal consultants at Sixty North. Occasionally, the fundamental flow control structures of Python, if‑else blocks, for loops, and while loops can feel limiting or clumsy. In this course, you'll learn about some extensions to these basic control structures and also some alternatives, which are often more suitable. Some of the major topics we'll cover include else clauses on while loops and for loops, else clauses on try‑except structures, emulating switch statements, and polymorphic dispatch on the type of objects. By the end of this course, you'll know how to use these flow control constructs to eliminate unnecessary conditionals in your programs, reducing their complexity and improving their reliability. 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, Core Python: Functions and Functional Programming, and Core Python: Classes and Object‑orientation. We hope you'll join us on this journey to learn more about Python with Core Python: Advanced Flow Control, here on Pluralsight.