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

Резултати

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

Пребарај: #instablog9javibes

当前筛选 #instablog9javibes清除筛选
Instablog9ja

@instablog9jaofficial · Post #173025 · 07.05.2026 г., 07:58

Omo… this Sophia vs Bolaji saga is slowly exposing how far some Lagos “big girls” allegedly go just to maintain the soft life image online 😭🍿 People are now dissecting Sophia’s chats after she admitted she tagged her shopper on items “she didn’t even purchase.” Social media users are alleging that some influencers and soft life babes intentionally tag shoppers on luxury items just to create the illusion that they’re constantly cashing out and buying designer nonstop 👀 The streets are also dragging luxury vendors who allegedly allow clients pose with bags, orange boxes and expensive items for content before returning them later. At this point, many are asking if social media luxury is really what it seems 😩 Lagos packaging no dey ever disappoint sha 💀 What’s your take on this whole “fake it till you make it” soft life culture? 👇🏽 PS: See previous post for context #Instablog9jaVibes#LagosGist#SoftLife#CelebrityDrama

Instablog9ja

@instablog9jaofficial · Post #173024 · 07.05.2026 г., 07:57

Sophia Egbueje calls out her luxury shopper Bolaji on Snapchat Lagos soft life don turn episode series 😭🍿 Imagine your personal shopper knowing ALL your secrets, receipts, debt stories, returned bags, and “packaging” moves… then friendship crashes 💀 At this point, who really keeps Lagos influencer secrets? 👀👇🏽 #Instablog9jaVibes#LagosGist#SoftLife#CelebrityDrama

Instablog9ja

@instablog9jaofficial · Post #173733 · 16.05.2026 г., 10:00

Frank Edoho thought Nigerians would drag Chike but the internet said “drop EP first” 😭💀 Instead of backlash, bros is getting movie bookings, love declarations and free promo. Men really move differently in this country abeg 🥴🍿 #FrankEdoho#Chike#NigerianTwitter#Instablog9jaVibes

Instablog9ja

@instablog9jaofficial · Post #173896 · 18.05.2026 г., 18:07

So village people are actually holding monthly board meetings and Nigerians are STILL stressing them 😭💀 Wait till you hear why Emeka really failed JAMB 😂 Comment the funniest excuse you’ve heard before 👀 #NigerianComedy #VillagePeople #FunnyReels #Instablog9jaVibes

Instablog9ja

@instablog9jaofficial · Post #173707 · 15.05.2026 г., 20:18

Internet people said Carter Efe should stream with Chike and omo… his reaction did not disappoint 😭😂 At this point, Nigerian social media deserves its own reality show because what is actually going on here? 💀 #CarterEfe#Chike#NigerianTwitter#Instablog9jaVibes

Instablog9ja

@instablog9jaofficial · Post #173416 · 12.05.2026 г., 20:16

Episode 1: Watermelon thought life was finally getting better 😭🍉 Next thing… pineapple wife announced baby number 73 👶🏽 Watch till the end because this house now sounds like Balogun market 😂 #NigerianHumor #FamilyChaos #AIReels #LagosLife #Instablog9javibes

Instablog9ja

@instablog9jaofficial · Post #173023 · 07.05.2026 г., 07:55

Lagos traffic can humble even the strongest person 😭🍉 Watch till the end to see what happened to this watermelon after “15 minutes away” turned into almost 3 hours 👀 What’s the worst traffic you’ve ever experienced in Lagos? #LagosTraffic #NigerianHumor #AIReels #LagosLife #Instablog9jaVibes

Instablog9ja

@instablog9jaofficial · Post #173020 · 07.05.2026 г., 07:54

NEPA really said “no soft life for anybody” 😭⚡ Just when the smoothie was blending perfectly… darkness entered. Watch till the end 🍓 What’s the fastest NEPA has ever taken light after your enjoyment started? 👀 #NigerianHumor#LagosLife#AIReels#RelatableContent#Instablog9jaVibes

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