TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #345 · 9 окт.

Функция 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

Резултати

Пронајдени 1 слични објави

Пребарај: #genopets

当前筛选 #genopets清除筛选
Go! Announcements

@gorwachain_announcements · Post #175 · 23.06.2023 г., 16:35

New Collab Alert! 🚨 Are you up for some healthy competition? We have partnered with Genopets for a highly rewarding healthy challenge with a $2000 prize pool! 🤯 How To Enter: 1️⃣ Sign up to Health Hero and Genopets by 6/29 at 11:59 PM PT (Use code "healthhero" on Genopets) 2️⃣ Follow both @Genopets & @Gohealthhero on Twitter 3️⃣ Like and retweet this competition's post on Twitter 4️⃣ Reply to the competition tweet thread with a photo of your Genopet 🏆 20 players will win part of a $2,000 prize pool - each winner gets $50 worth of $HLTHY and $50 worth of $GENE, plus their Go!Bot NFT. Remember, with Health Hero you can unlock up to 50% cash back on healthy purchases and health benefits such as global telehealth and mental health. Stay active with your Genopet, get health rewards with Health Hero 🤝 #web3#collab#genopets#health#wellness#p2e#m2e