Функция dir() - удобна для получения списка атрибутов у любого объекта.
Ранее я писал про функцию __dir__() в модуле (не путайте её с переменной __all__(), которая указывает список объектов для импорта если встречается конструкция from module import *).
Скорее всего вы уже знаете как использовать функцию dir(). Любой объект может реализовать метод __dir__() чтобы указать список имеющийхся и динамических атрибутов. И функция dir() поможет получить список этих атрибутов.
>>> dir(str)
['__add__', '__class__', '__contains__', ...]
У этой функции есть еще один способ применения. Её можно вызвать без аргумента, и в таком случае она вернёт список имён в текущем неймспейсе.
>>> dir()
['__builtins__', '__doc__', '__file__', ...]
>>> def test():
>>> x = 1
>>> print(dir())
>>> test()
['x']
#basic#tricks
😄Issue
➖➖➖➖➖➖
🔘Issue, as a noun, can be an important topic that people are talking about.
🔜The environment is an important issue.
🔜The energy crisis is a big issue for many people.
🔘An issue can also be 'a problem'.
🔜If you find any issues with our videos, please let us know.
🔜Your work was good, but there are a few issues you need to address.
🔘As a verb, we can use 'to issue'. This describes something being ready or available, often for official purposes.
🔜I'm waiting for reception to issue my work pass.
🔜my new driving license has finally been issued.
🔘We can call a newspaper or magazine an issue if it belongs to a certain title.
🔜Read about this story in next week's issue!
#Issue👨🏫@America
➖➖➖➖➖➖➖➖➖➖➖➖
🆕 Crypto News @Money
😁 Crypto Game @Egame
🇺🇸 US News @America
🇯🇵 Japan News @Japan
🇦🇪 UAE News @Dubai
▶️ Popular Movies @Videos
😜 Best Funny Video @Funnys