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 слични објави

Пребарај: #v6power

当前筛选 #v6power清除筛选
Auto Life

@revheadcrypto · Post #250 · 06.08.2024 г., 09:32

🚗✨Nissan Unveils the Updated Frontier Pickup!🌟 Get ready for the all-new look of the Nissan Frontier, designed specifically for the North American market! 🇺🇸💪 🔧What's New? - Fresh exterior design for a bold presence! - Upgraded media system with a larger screen for an enhanced driving experience! 📱🎶 - Expanded features to keep you connected and comfortable! ⚙️Under the Hood: No changes here! The Frontier continues to boast a powerful 3.8-liter V6 engine with 310 horsepower and a smooth 9-speed automatic transmission! 🚀 #NissanFrontier#PickupTruck#NewRelease#AutomotiveNews#V6Power#Auto