Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Expert Python: Deep Dive & Mastery
·
Module 2
Advanced Functions, Closures & Decorators
1
First-Class Functions
Explain how functions are first-class objects and use them as arguments and return values.
2
Closures for Encapsulating State
Define and use closures to encapsulate state without classes.
3
Python Scope and the `nonlocal` Keyword
Explain Python's variable scoping rules (LEGB) and correctly use the `nonlocal` keyword.
4
Parameterized Decorators with Arguments
Write parameterized decorators that accept arguments to customize function behavior.
5
Leveraging `functools` for Robust Decorators
Use `functools.wraps`, `functools.lru_cache`, and `functools.partial` to build robust decorators and utilities.
6
Decorator Stacking and Execution Order
Implement decorator stacking and analyze the execution order of multiple decorators.
7
Argument Forwarding with `*args` and `**kwargs`
Master argument forwarding using `*args` and `**kwargs` in decorators and higher-order functions.
Next module isn't ready yet,
Back to course
Previous module
Python Object Model & Memory Management
Next module