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

Резултати

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

Пребарај: #newchapter

当前筛选 #newchapter清除筛选
DeckForge Announcement

@deckforge_official · Post #224 · 21.04.2025 г., 17:36

The story has always been there. DeckForge is more than just a game. It’s a world with its own rules, its own power, and its own history. Until now — you’ve only seen the surface. But starting this week, the veil begins to lift. We’ll reveal the origins. The forces at play. The Forge at the center of it all. Welcome to the beginning of DeckForge lore. Stay tuned — the world is about to speak.. #DeckForge#LoreUnfolds#NewChapter Join the DeckForge Community: 🌐YouTube𝕏Twitter 👉Chat👉Announcements

BadVolf

@badvolfnews · Post #1516 · 16.03.2024 г., 18:08

🇷🇺❤Today marks a monumental chapter in my journey, as I proudly announce that I've become a Russian citizen and participated in my very first election here. This significant step is more than just a formal process; it symbolizes my deep connection and commitment to my new home, its people, and its future. As I stood in the polling station, casting my vote, I was overwhelmed with a sense of responsibility and belonging. This act of civic engagement is a powerful reminder of the role we each play in shaping the course of our community and nation. It's a day filled with emotions - pride, hope, and anticipation for what lies ahead. Joining my fellow citizens in this democratic process, I felt a strong bond of unity and shared purpose. Here's to embracing new beginnings, contributing to the collective future, and making every moment count in this beautiful journey. #Citizenship#ElectionDay#NewChapter#RussianCitizen🇷🇺✨

𝑺𝒐𝒏𝒐 𝒏𝒖𝒅𝒐.

@sononoodo · Post #41458 · 01.04.2026 г., 07:39

Sono entusiasta di condividere un nuovo capitolo del mio personale brand journey! 🚀 Con grande orgoglio, annuncio il mio recente "upgrade" strategico dello stile personale: ho scelto di vestirmi, un passo fondamentale per evolvere il mio stato da "nudo" a "diversamente nudo". 👔✨ Questa scelta si allinea perfettamente con i miei valori di crescita professionale e di impatto visivo, segnando un momento chiave nella mia missione di esprimere al meglio il mio potenziale. 🌟📈#NewChapter#StyleEvolution#PersonalBranding#GrowthMindset

Notes I Never Shared 🌱

@notesinevershared · Post #69 · 28.08.2025 г., 19:20

🔄🇺🇿 #15 — 4 Kun ichida 3 ish taklifi: Hayotimdagi yangi bosqich Oradan 4 kun o‘tgach, men topshirgan Birlashgan Arab Amirliklaridagi kompaniyalardan menga qo‘ng‘iroq bo’ldi. Ular intervyu o‘tkazishdi. Tez orada 3 ta ish taklifini oldim. Qanday ish deb qiziqayotgan bo‘lsangiz, offitsiant (waiter)— bu ishga kirish va ketish uchun eng oson yo‘llardan biri. Bu jarayon menga sabr, qat’iyat va Allohga tavakkul qilishning ahamiyatini yana bir bor eslatdi. Harakat qilmasdan, faqat orzu qilish bilan hech narsaga erishib bo‘lmaydi. Har bir qadam, har bir qaror — bu yangi imkoniyatlarga yo‘l ochadi. 🔄🇬🇧 #15 — 3 Job Offers in 4 Days: A New Chapter Begins Just three days later, I received a call from the companies I had applied to in the United Arab Emirates. They conducted an interview, and soon after, I received three job offers. Curious about the role? It's a waiter position — one of the easiest entry points into the job market there. This experience reminded me of the importance of patience, determination, and placing trust in Allah. Simply dreaming without taking action leads nowhere. Every step, every decision opens doors to new opportunities. #EverythingILived#TrustInAllah#Action#Dua#Dreams#Dubai#NewChapter

Мирослава Карпович

@m1r0slavakarpovich · Post #818 · 01.03.2023 г., 06:17

С ВЕСНОЙ ВАС🤍🕊️✨ #highlevel#newchapter#goldenedition Photobombed me @hristy__🧨 Makeup & hair @elena__muah💋 #muse#яработаюмузой#actress#actrice#model#legslegslegs#elevation#higher#postcard#spring#springspringspring#springfashion#moodoftheday#photography#photooftheday#lady#mademoiselle#purelove#heavenonearth#благодарю#люблю#свеснойвас#доброеутро#petitefemme#mira#женщинамира#карповичмирослава