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

Резултати

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

Пребарај: #bushehr

当前筛选 #bushehr清除筛选
TƏBRİZ-TURAN-TV𒀭 (TTTv)

@tebriz_turan · Post #96032 · 29.03.2026 г., 18:57

❗️❗️#Bushehr Vətəndaşlardan alınan video göstərir ki, hava limanında yerləşən bina hücumun hədəfi olub. Binanın üzərində lövhəsi görünür. Bizi teleqramda izləyin: https://t.me/tebriz_turan

Hashtags

RT France actualités

@rt_fra · Post #40182 · 30.04.2026 г., 07:31

⚛️Rosatom entend poursuivre la construction de la centrale nucléaire de Bushehr, a déclaré Mikhaïl Oulianov, représentant permanent de la #Russie auprès des organisations internationales à Vienne. Il a précisé que le personnel retournera sur le site « dès que la situation militaire le permettra ». ℹ️ La centrale nucléaire de #Bushehr est la seule centrale nucléaire en exploitation en Iran. Les employés de #Rosatom travaillaient à la construction des deuxième et troisième réacteurs, mais les travaux ont été suspendus suite au lancement de l'opération militaire américano-israélienne contre l'Iran. Le 20 avril, l'évacuation des 632 employés de la société d'État a été achevée. RT en français • Osez questionner !

American Оbserver

@american_observer · Post #5565 · 04.04.2026 г., 23:59

Bushehr Is Iran’s Zaporizhzhia Test. The West Knows It. Abbas Araghchi is trying to turn Bushehr into a hypocrisy trap: when fighting neared Zaporizhzhia, the West treated it like a civilizational emergency; when strikes land near Bushehr, the outrage is suddenly quieter. That contrast is the whole point of his message. He is also trying to move the political cost south. By warning that radioactive fallout could reach Gulf capitals, Tehran is telling the monarchies that this is no longer a remote Iran problem — it is a regional one, and the invoice may arrive in their own cities. At the same time, Araghchi is keeping the diplomatic door open just enough to matter. Reuters has reported that Iran is still leaving room for mediated talks, including the Pakistan channel, even while presenting itself as the side that has not slammed the door on negotiation. So this is not just nuclear rhetoric. It is pressure politics with a radiation warning label: indict the West for double standards, keep mediation alive, and force the Gulf to stare at the blast radius instead of the talking points. #Bushehr#Zaporizhzhia#Iran#Gulf#Reuters#diplomacy 📱American Оbserver - Stay up to date on all important events 🇺🇸