Загрузка страницы

Tips Tricks 17 - All you need to know about decorators in python

Code generated in the video can be downloaded from here:
https://github.com/bnsreenu/python_for_microscopists

Dataset:
https://www.kaggle.com/uciml/pima-indians-diabetes-database

A decorator in python allows us to add new functionality to an existing
object (function or class) by not requiring us to modify the object's structure.

Decorators allow us to wrap another function to extend the behavior of the wrapped function, without permanently modifying it. They are typically called before defining another function that we'd like to decorate.

Functions are first-class objects in python. This means they support
the following operations.

- Stored in a variable.
- Passed as an argument to another function.
- Defined inside another function.
- Returned from another function.
- Store in data structures such as lists.

Decorators leverage this behavior of functions.

Видео Tips Tricks 17 - All you need to know about decorators in python канала DigitalSreeni
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
23 августа 2021 г. 12:00:16
00:41:05
Яндекс.Метрика