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

Пребарај: #minijcw

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

@revheadcrypto · Post #52 · 06.07.2024 г., 12:18

📸Exciting news from the automotive world! The first electric MINI JCW E will be revealed on 11 July at the 'Festival of Speed' in Goodwood. 🤫 Stay tuned for more details on the powertrain, although with options like a 184bhp motor with a 40.7kWh battery and a 218bhp motor with a 54.2kWh battery in the electric MINI Cooper SE, we can expect the JCW version to pack even more power. 📆 While the MINI JCW E PROtotype will be showcased in action at the event, the full details will be unveiled later this year. MINI also hints that the JCW lineup will feature both electric and gasoline models. #ElectricVehicles#MINIJCW#GoodwoodFOS#AutomotiveInnovation#MINICooperSE#FutureOfMobility#Auto