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

Пребарај: #excerpts

当前筛选 #excerpts清除筛选
Pensive|

@PensivePost · Post #5350 · 07.08.2021 г., 23:32

The beau, ignorance. I knew. That made me a shitty person If there was anything that made it unbearable and more hard to overcome than anything, it’s the fact that I knew it was going to happen. It’s a pity we don’t get to un-know stuff. Like just trash it. It felt(no, was )wrong. Like hoarding the girls lavatory or cyber bullying overweight people because it felt right Or self-hurting so you can feel anything other than this unimaginable sorrow that was slowly drowning you. If there was anything that was worse than knowledge, it’ll be passivity, more like apathy. The fact that you didn’t act. That I didn’t act This didn’t feel wrong. It didn’t feel like anything I have ever felt. Words can’t quantify how it feels. Probably, nothing will. I hope nothing does. Excerpt from my book, For the Lies that Matter @whosayegat #review #everyone #excerpts