Friday 1:30 PM–3:00 PM in Track 2 - Room 100A

Five Kinds of Python Functions

Steven Lott

Audience level:
Intermediate

Description

Python offers a variety of ways to define functions, and function-like objects, commonly known as "Callable." There are a number of common design patterns, and it helps to see them side-by-side to help choose among the alternatives. We'll look at functions, higher-order functions, lambdas, callable objects, generators. And more.

Abstract

Here are the topics.

We'll punctuate each description with some programming time to build a little bit of working code around each concept.

And yes, there are six distinct kinds of functions. As we dig into details, we'll see that the distinction between "Higher-Order Functions" is kind of artificial, and is more of a design pattern, than a language distinction.

Subscribe to Receive PyData Updates

Subscribe