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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #197 · 4 јан.

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #sadness

当前筛选 #sadness清除筛选
Quiet World 🍁

@QuietWorld · Post #6998 · 30.11.2019 г., 02:40

🍂 “Our Lord has written the promise of resurrection, not in books alone but in every leaf of springtime.” – Martin Luther 🌻look at the trees with fallen leaves during autumn, they keep on standing and stand strong despite many of their leaves fall down; as if they know and trust that they will not stay in that condition forever - in fact, they'll shine more beautifully soon when the spring comes. so dear, whenever you are in crestfallen, trust that that too shall pass.. be sad, but don't lose hope that tomorrow can be better☺️ #life#thoughts#sadness#happiness#motivation @quietworld🍃

Quiet World 🍁

@QuietWorld · Post #7015 · 01.12.2019 г., 08:31

🍂 something you dislike happened? you couldn't get something you wish for? you have been disappointed and someone hurt you? you lost someone? you failed at something you hope you're good at? and you feel sad about it? then be so. feel sad. be sad. cry if you must. cry your heart out. let it out. it heals to cry. it heals to allow yourself to feel things; be human. because yes it is difficult to go through those things. & that doesn't mean that you are weak. to feel those feelings are not a sign of weakness at all ; just that we are human, we are born with the ability to feel those emotions. your strength is not determined by your ability to suppress emotions, but by your ability to overcome it; by not letting it controls yourself longer than it should be. there's light at the end of the tunnel if you keep going. #thoughts#notetoself#selfreminder#strength#positivity#sadness#motivation @quietworld🍃

Yukiokhruner

@yukiokhruner · Post #25 · 15.04.2022 г., 19:21

L'amore ed i sentimenti in generale stanno vivendo una brutta epoca, sostituiti il più delle volte da pulsioni eremitiche. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#illusione#illusion#solitudine#loneliness#luciajavorcekova

La guerra é portatrice di ingiustizie ed inganni, di questi ultimi uno dei più grandi é quello di pretendere di costruire un mondo migliore. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#guerra#war#violenza#violence#illusione#illusion

Yukiokhruner

@yukiokhruner · Post #27 · 24.04.2022 г., 15:09

Non é entusiasmante prendere consapevolezza di essere quasi coetaneo di Homer Simpson. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#simpson#simpsonwave#homer#homersimpson

Yukiokhruner

@yukiokhruner · Post #11 · 02.04.2022 г., 10:43

Secondo me a livello culturale siamo immersi in una sorta di nuovo barocco, nell'accezione più deteriore del termine. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#apparenza#appearance#illusione#illusion#spettacolo#show

Yukiokhruner

@yukiokhruner · Post #48 · 09.06.2022 г., 15:40

Mi sono stancato di influencer e tiktoker vari, buoni solo a pietrificare l'attenzione verso cose futili. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#apparenza#appearance#appearance#illusione#illusion#incubo#nightmare

#vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#guerra#violenza#violence#futurismo#futurism#willsmith

Yukiokhruner

@yukiokhruner · Post #46 · 04.06.2022 г., 15:03

Parole inconsistenti e pii desideri. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#illusione#illusion#utopia#razzismo#racism#cgil

Yukiokhruner

@yukiokhruner · Post #13 · 03.04.2022 г., 15:18

Trovare le parole giuste con tutti e saper cogliere le sfumature di tutte quelle che ricevo, l'ho sempre trovato uno sforzo estremo. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#disagio#unease#comunicazione#communication#linguaggio#language

Yukiokhruner

@yukiokhruner · Post #15 · 05.04.2022 г., 16:16

L'attaccamento agli oggetti é uno degli ostacoli maggiori per la nostra felicità, come se infondessimo in essi parte della nostra anima. #vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#disagio#nostalgia#illusione#illusion#windows95#windows98#windowsxp

ПретходнаСтраница 1 од 3Следна