Функция 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
💧Airdrop : Proud Kitty Gang💧
📣Complete Task: ➕ 500,000 #MINT
🏆Winners: 1000 Lucky Winners.
📅End date: 20th Jun, 2022
💎Ratings: ⭐️⭐️⭐️
🔛Proud Kitty Gang Airdrop Gleam Click Here 🔛
🌀 Follow on Twitter and retweet the pinned post.
📡Enter your information to the Airdrop Gleam.
🗞Note: All airdrop steps should be completed.
🛳Business Inquiry: Admin || Admin2
🗣#MINT
Claim your drop from MINT
Deadline: February 15
What to do:
✔️Visit the website
✔️Claim your boxes.
🟠1% of the total token supply is allocated to these boxes.
🟠TGE is promised in Q1 of this year.
🟠Boxes are awarded for owning NFT Mint Genesis (also for interacting with collections on OpenSea and Blur).
Crypto Drop Club 👉 SUBSCRIBE
🆕 Mint Blockchain is now live on TokenPocket.
🟢Mint blockchain is the Native Ethereum L2 for the NFT Industry. Bringing NFT into Mass Adoption alongside Superchain🟢🔴. Powered by Optimism and nftscan_com.
🚀How to create/import a #Mint wallet on #TokenPocket Mobile Wallet and Chrome Extension Wallet?
Guide👉https://help.tokenpocket.pro/en/wallet-operation/how-to-create-a-wallet/mint
💙Download #TokenPocket, create your Mint Wallet, and stay tuned to the upcoming campaign! 🔥
👉https://tokenpocket.pro
👉https://extension.tokenpocket.pro