Функция 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
#mdx
This free interactive course teaches Product Managers to use Claude Code for daily tasks like processing notes, writing PRDs, analyzing data, and strategy planning through hands-on modules (4-6 hours). Clone the repo, run `claude`, and follow guided lessons with agents and file tools—no setup needed yet. You'll work faster, get instant multi-perspective feedback, and boost productivity without quality loss.
https://github.com/carlvellotti/claude-code-pm-course
#MDX result
1 and 2 target achieved in just 1 house 21 minutes ✅
One more huge quick profit 11%🤑💰🤑
👉 Still thinking? The more you wait more you lose profit
☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal
#MDX bounced back from the Trendline on 6H Time frame,we expect a good bullish momentum from the Green zone,send it to the moon 🚀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️