Objective
Workshop to understand decorators in detail. At the end of the workshop, the participants will be able to write decorators without any confusion, including the ones that take arguments.
Description
Decorators are heavily used in modern python libraries and web frameworks. But they are still mystery to many people. In this 3-hour long workshop I plan to explain the concept of decorators in detail using lot of examples and exercises.
This is a stripped and compressed version of 3-day advanced python course offered by the author, covering only decorators.
Outline:
- Functions that take functions as arguments
- Functions returning functions
- Decorators
- Decorators that take arguments
- Building a simple web framework using decorators
This workshop is targeted at people who have been using Python and want to decorators in detail.
This workshop is not suitable for people who are new to Python. If you have never used a decorator before, this course is not for you.
Requirements
- A laptop with Python 2.7 installed.
- Should be comfortable with Python and have basic idea of what decorators are.
Speaker bio
Anand Chitipothu is a software consultant and trainer. He offers corporate trainings on Python and conducts public courses on
Python programming in Bangalore.
He is an active member of Indian Python community, coordinator of PyCon India 2012, organized PythonMonth in 2013 and elected member of PSF.
He is co-author of web.py, a micro web framework in Python and currently works for Internet Archive.
1
▼
It would be nice have a section where classes which can behave like decorators.
1
▼
The training notes will be available at http://anandology.com/nb/2014/decorators-demystified/