Telegram Group & Telegram Channel
Проверка отношения классов

Для того, чтобы проверить отношения двух классов или экземпляров (является ли класс классом наследником), есть две простые встроенные функции isinstance(object, classinfo) и issubclass(class, classinfo).

instance - возвращает True, если объект является экземпляром класса либо экземпляром подкласса данного класса.
issubclass — проверяет является ли класс наследником другого класса.

Данные функции зачастую применяются в ООП.

#isinstance #issubclass



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

Проверка отношения классов

Для того, чтобы проверить отношения двух классов или экземпляров (является ли класс классом наследником), есть две простые встроенные функции isinstance(object, classinfo) и issubclass(class, classinfo).

instance - возвращает True, если объект является экземпляром класса либо экземпляром подкласса данного класса.
issubclass — проверяет является ли класс наследником другого класса.

Данные функции зачастую применяются в ООП.

#isinstance #issubclass

BY Python Academy




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

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

Telegram Auto-Delete Messages in Any Chat

Some messages aren’t supposed to last forever. There are some Telegram groups and conversations where it’s best if messages are automatically deleted in a day or a week. Here’s how to auto-delete messages in any Telegram chat. You can enable the auto-delete feature on a per-chat basis. It works for both one-on-one conversations and group chats. Previously, you needed to use the Secret Chat feature to automatically delete messages after a set time. At the time of writing, you can choose to automatically delete messages after a day or a week. Telegram starts the timer once they are sent, not after they are read. This won’t affect the messages that were sent before enabling the feature.

Python Academy from hk


Telegram Python Academy
FROM USA