PYTHONOFFF Telegram 2989
Добавляем классу большую функциональность

Декоратор @ classmethod — это метод, который получает класс в качестве параметра, который принято обозначать как cls. Он указывает на класс ToyClass, а не на объект этого класса.

Методы класса привязаны к самому классу, а не его экземпляру. Они могут менять состояние класса, что отразится на всех объектах этого класса, но не могут менять конкретный объект.

Проще говоря, @ classmethod — это обычный метод класса, имеющий доступ ко всем атрибутам класса, через который он был вызван.

Подписывайтесь на канал 👉@pythonofff



tgoop.com/pythonofff/2989
Create:
Last Update:

Добавляем классу большую функциональность

Декоратор @ classmethod — это метод, который получает класс в качестве параметра, который принято обозначать как cls. Он указывает на класс ToyClass, а не на объект этого класса.

Методы класса привязаны к самому классу, а не его экземпляру. Они могут менять состояние класса, что отразится на всех объектах этого класса, но не могут менять конкретный объект.

Проще говоря, @ classmethod — это обычный метод класса, имеющий доступ ко всем атрибутам класса, через который он был вызван.

Подписывайтесь на канал 👉@pythonofff

BY Python академия




Share with your friend now:
tgoop.com/pythonofff/2989

View MORE
Open in Telegram


Telegram News

Date: |

For crypto enthusiasts, there was the “gm” app, a self-described “meme app” which only allowed users to greet each other with “gm,” or “good morning,” a common acronym thrown around on Crypto Twitter and Discord. But the gm app was shut down back in September after a hacker reportedly gained access to user data. Telegram message that reads: "Bear Market Screaming Therapy Group. You are only allowed to send screaming voice notes. Everything else = BAN. Text pics, videos, stickers, gif = BAN. Anything other than screaming = BAN. You think you are smart = BAN. Today, we will address Telegram channels and how to use them for maximum benefit. The initiatives announced by Perekopsky include monitoring the content in groups. According to the executive, posts identified as lacking context or as containing false information will be flagged as a potential source of disinformation. The content is then forwarded to Telegram's fact-checking channels for analysis and subsequent publication of verified information. Hui said the messages, which included urging the disruption of airport operations, were attempts to incite followers to make use of poisonous, corrosive or flammable substances to vandalize police vehicles, and also called on others to make weapons to harm police.
from us


Telegram Python академия
FROM American