Telegram Group & Telegram Channel
Получаем атрибуты объекта

Функция vars() возвращает все атрибуты переданного параметра, в качестве которого может быть почти что угодно: модуль, класс, экземпляр и т. д.

Проще говоря, vars() возвращает словарь, который хранится в атрибуте __dict__ у переданного объекта.

А если ничего не передать в аргументы, то функция вернет словарь локальных переменных, как и locals() (про это был пост, кстати).

#переменные



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

Получаем атрибуты объекта

Функция vars() возвращает все атрибуты переданного параметра, в качестве которого может быть почти что угодно: модуль, класс, экземпляр и т. д.

Проще говоря, vars() возвращает словарь, который хранится в атрибуте __dict__ у переданного объекта.

А если ничего не передать в аргументы, то функция вернет словарь локальных переменных, как и locals() (про это был пост, кстати).

#переменные

BY Python Academy




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

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Why Telegram?

Telegram has no known backdoors and, even though it is come in for criticism for using proprietary encryption methods instead of open-source ones, those have yet to be compromised. While no messaging app can guarantee a 100% impermeable defense against determined attackers, Telegram is vulnerabilities are few and either theoretical or based on spoof files fooling users into actively enabling an attack.

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 jp


Telegram Python Academy
FROM USA