Understanding Python Decorators

Tankala Ashok (~tankala)


0

Votes

Description:

We use decorators in many places. When we create an API route, dataclass & etc. But how it works few people know. Want to cover through this talk what are they and how we can build our own.

Outline:

  1. what exactly is Decorator?

  2. Understanding Python Functions as First class citizens Function as an input argument, Function as a Return Value, Inner functions

  3. Understanding Decorators with a Simple Example Simple Decorator Example, Adding Syntactic Sugar to it, Problem with this simple Approach, Solving it with @functools.wraps

  4. Some Real World Examples Timing Decorator, Passing arguments to the decorator

Prerequisites:

They should know the basics of Python

Content URLs:

https://newsletter.piptrends.com/p/understanding-python-decorators

https://bavanti-my.sharepoint.com/:p:/p/ashok/ESP7a_EnWWtIjiFadSbvAyUB1DZgQU-JGNejh71G_9fXbw?e=JC1efy

Speaker Info:

My name is Ashok Tankala. I am a Fractional CTO. I have 16+ years of experience in the software industry. I am the founder of piptrends.com.

I gave talks previously at meetups, PyConf Hyderabad and FlaskCon.

Speaker Links:

My Portfolio site: https://ashok.tanka.la

LinkedIn: https://www.linkedin.com/in/ashoktankala/

Blog: https://medium.com/@ashok.tankala

GitHub: https://github.com/tankala

Section: Core Python
Type: Talk
Target Audience: Beginner
Last Updated: