Python Decorators Tutorial: how Python decorators work

Publicado em: 31 Janeiro 2019
no canal de: Red Eyed Coder Club
2,231
58

This Python Decorators Tutorial video is about what are decorators in Python and how Python decorators work. The video is for absolute beginners with simple examples.

I started with creating a background for a Python decorator usage, and specified the problems that decorators solve.


Follow me @:
Telegram: https://t.me/red_eyed_coder_club
Twitter:   / codereyed  
Facebook: https://fb.me/redeyedcoderclub


✴️✴️✴️ Web Scraping course ✴️✴️✴️
is available via Patreon here:
  / red_eyed_coder_club  

or its landing:
https://red-eyed-coder-club.github.io...


In this video reviewed three versions of Python decorators:
1. A simple decorator for a function that not accepting any arguments
2. A decorator for a function that accepting some arguments
3. A decorator that has own arguments for a function that accepting some arguments

And a small bonus:
A small demo that list comprehensions are faster than a FOR loop for generating lists.

Python Decorators are possible because of Python functions are first class objects.
First class object means that:
functions are real objects that even have own methods
a function can be assigned as a value to variables
a function can be sent to another function as an argument (like it happens with the map() function)
we can return function objects as a returning value of another function
inside a function we can define another... nested function.

Timecodes:
7:57 - the beginning of explanation.
12:35 - Python decorators for function with arguments
18:48 - Python decorators with arguments for function that have own argument


➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Never miss a new video.
Subscribe ⇢    / @redeyedcoderclub  

This Python decorators tutorial is about how decorators work in Python.

Python Decorators Tutorial: how Python decorators work:
   • Python Decorators Tutorial: how Pytho...  

#python #pythontutorial #redeyedcoderclub


Nesta página do site você pode assistir ao vídeo on-line Python Decorators Tutorial: how Python decorators work duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Red Eyed Coder Club 31 Janeiro 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,231 vezes e gostou 58 espectadores. Boa visualização!