Telegram Group & Telegram Channel
Деструкторы

При уничтожении экземпляра класса в большинстве языков вызывается специальный метод, который называется деструктор.

В Python деструктор можно переопределять с помощью магического метода __del__, который вызовется автоматически при удалении объекта.

Вообще деструкторы крайне редко переопределяется в Python, но полезно знать, что именно эти методы отвечают за очистку при удалении объекта.

#классы



tg-me.com/python_academy/689
Create:
Last Update:

Деструкторы

При уничтожении экземпляра класса в большинстве языков вызывается специальный метод, который называется деструктор.

В Python деструктор можно переопределять с помощью магического метода __del__, который вызовется автоматически при удалении объекта.

Вообще деструкторы крайне редко переопределяется в Python, но полезно знать, что именно эти методы отвечают за очистку при удалении объекта.

#классы

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/689

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

What is Secret Chats of Telegram

Secret Chats are one of the service’s additional security features; it allows messages to be sent with client-to-client encryption. This setup means that, unlike regular messages, these secret messages can only be accessed from the device’s that initiated and accepted the chat. Additionally, Telegram notes that secret chats leave no trace on the company’s services and offer a self-destruct timer.

Python Academy from br


Telegram Python Academy
FROM USA