Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorators and their uses in python #309

Open
virajsharma2000 opened this issue Nov 10, 2024 · 0 comments
Open

Decorators and their uses in python #309

virajsharma2000 opened this issue Nov 10, 2024 · 0 comments
Labels
proposal want to talk at pydelhi

Comments

@virajsharma2000
Copy link

virajsharma2000 commented Nov 10, 2024

Title

Decorators and their uses in python

Describe your Talk

Decorators in Python are functions that allow you to modify or extend the behavior of other functions or methods without altering their code. A decorator works by wrapping the original function in a "wrapper" function, which can execute additional code before and/or after calling the original function.

We also discuss some non-obvious uses of decorators. For example, decorators can implement memoization, caching the results of function calls or even make a function self-destruct after one use. Additionally, decorators can simulate retry logic by automatically retrying a function if it fails, which is especially useful for network requests.

Pre-requisites & reading material

Preread:

Code examples:
https://github.com/virajsharma2000/python_apps/tree/main/decorators/decorator

Time required for the talk

10-15 minutes

Link to slides/demos

https://docs.google.com/presentation/d/1imSOgDvd-Zk0TX3Wx2wYFgcgqlwPM4UQVzmfX_uIwCs/edit?usp=sharing

About you

Hi I am Viraj, I love writing python code and learning about new features in the language

Availability

16/11/2024

Any comments

Excited to be talking about this

@virajsharma2000 virajsharma2000 added the proposal want to talk at pydelhi label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal want to talk at pydelhi
Projects
None yet
Development

No branches or pull requests

1 participant