Skip to Content
Python Functions Deep Dive Part 2: Write Simple and Parameterized Decorator
on-demand course

Python Functions Deep Dive Part 2: Write Simple and Parameterized Decorator

with Coen de Groot
May 2024
Intermediate content levelIntermediate
48m
English
Apress
Closed Captioning available in English

Overview

This is the second part of a two-part video series about Python functions.

This video will explore local and global variables, nested functions, and using closures for encapsulation of state within functions. Next, the video will cover how to use functions as arguments and return values, and monkey patching. Finally, we will look at decorators. Decorators rely on several fundamental concepts, all covered previously in this video, to do something that can look a bit like magic - they let you add behavior to an existing function without touching the original ('decorated') function. The video will demonstrate how to write a simple decorator, followed by a parameterized one.

The video provides resources for continuing the learning journey with Python functions.

What You Will Learn:
• How to structure your code using functions
• What are Nested functions
• What is Monkey patching
• What is Simple decorators and decorators with arguments
Who This Video is For:
This course is for beginner to intermediate Python developers who really want to understand how functions work and how to make the most of them.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python For Loops and Iterables Deep Dive: Write Iterable Classes and Create Generator Functions and Expressions.

Python For Loops and Iterables Deep Dive: Write Iterable Classes and Create Generator Functions and Expressions.

Coen de Groot
Build a useful Python decorator

Build a useful Python decorator

Alfredo Deza, Noah Gift
Python Functions and Classes

Python Functions and Classes

Alfredo Deza, Noah Gift

Publisher Resources

ISBN: 9798868801617