Функция 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
⚡️TapSwap Community: Major News Incoming Tomorrow!
#TapSwapBeta#SkillGaming#Web3Games
TapSwap Community announces a major update about their private beta launching tomorrow, featuring three exclusive skill-based games in Telegram. Limited spots are available, and interested participants should prepare to apply using a Google form link with their Telegram handle.
Source: link
@tonlines
TapSwap Community: Elevate Your Gaming Skills with Precision
#SkillGaming#TapToWin#ClassicWithCrypto
The TapSwap Community emphasizes skill and precision in classic games like Tetris, Solitaire, and Bubble Shooter. Players are encouraged to hone their focus and ability to outplay and earn, adding purpose to their gaming experience.
Source: link
@tonlines
🎮TapSwap officially launched the beta!
The project has made an important step forward — now skill games are available for the first testers directly in Telegram. Convenient format, fast loading and no unnecessary actions.
What's included in the beta:
• 🎯 Three games where the outcome depends on your skills
• 💰 Integration with $TAPS
• 📲 Access via Telegram mini-app
⚠️ At the current stage, only selected users have access to the beta.
If you are among them, you can already try out the platform before the official release.
🗓The public launch is scheduled for early June.
#TapSwap#БетаЗапуск#SkillGaming#Web3UA
Bot link:tapswap_bot📱
Nigeria Football Hub
🎮TapSwap officially launched the beta!
The project has made an important step forward — now skill games are available for the first testers directly in Telegram. Convenient format, fast loading and no unnecessary actions.
What's included in the beta:
• 🎯 Three games where the outcome depends on your skills
• 💰 Integration with $TAPS
• 📲 Access via Telegram mini-app
⚠️ At the current stage, only selected users have access to the beta.
If you are among them, you can already try out the platform before the official release.
🗓The public launch is scheduled for early June.
#TapSwap#БетаЗапуск#SkillGaming#Web3UA
Bot link:tapswap_bot📱
INSIDER USA 👉🏻 Subscribe