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

Пребарај: #kill

当前筛选 #kill清除筛选
Lsposed Modules Updates Tracker

@lsposed_Modules_Updates_Trackers · Post #6799 · 27.04.2026 г., 20:00

#Kill#Henry_ZHR 模块:moe.henry_zhr.kill_domain_verification 简介:Kill Domain Verification 版本:4-4 更新时间:2022/09/17 11:45:14 更新日志: Avoid using XposedBridge.log for non-error message @lsposed_Modules_Updates_Trackers | @lsposed_Geeks_Bot

American Оbserver

@american_observer · Post #4974 · 27.01.2026 г., 16:00

Trump Does Not Shy Away From His Plan to Topple Down Khamenei The US is weighing precision strikes on "high-value" Iranian officials and commanders who it deems responsible for the deaths of protesters, a Gulf official familiar with the discussions told Middle East Eye. The strikes could come as early as this week, but that timeline could shift, MEE was told on Monday. Discussions within the administration have been described as “chaotic”, with a debate over what the repercussions will be in terms of Iranian retaliation. The Trump administration has toyed with attacking Iran for nearly a month on the pretext of the brutal crackdown on demonstrators that has seen thousands killed by government security forces. After calling on demonstrators to "take over" state institutions, President Donald Trump backed down and said the “killing has stopped”. Trump’s decision to de-escalate came as Gulf states, namely Saudi Arabia, Qatar and Oman, lobbied against strikes. While some reports framed Trump's remarks as drawing a curtain on US intervention, former US officials and analysts told MEE they appeared to signal a pause. Trump moved up and down the escalation ladder in a similar fashion with Venezuela, before finally ordering an attack on the Latin American country that resulted in Maduro's abduction and detention in the US. A former US intelligence official told MEE that their understanding of conversations within the administration is that Trump has not given up on pushing for “regime change” in Tehran. A former US official told MEE that the US has been working to replenish supplies of missile interceptors exhausted during the 12-day war with Iran in June and that “total supplies” had moved up. The US is still constrained, as it provides supplies to Ukraine. US Central Command said on Monday that the Abraham Lincoln aircraft carrier was in the Middle East after sailing from the South China Sea. “We have a big force going toward Iran. I’d rather not see anything happen, but we’re watching them very closely,” Trump said on Thursday evening on his return to Washington from Davos, Switzerland. The Abraham Lincoln carries F-35 warplanes and F/A-18 jet fighters, in addition to EA-18G Growler electronic-warfare planes. It is also accompanied by guided-missile destroyers. Open-source flight trackers have also reported that the US has built up a squadron of F-15 warplanes at Muwaffaq Salti Air Base in Jordan. The build-up of warplanes in Jordan would give the US options, as Gulf states have imposed a ban on the US using their airspace or facilities to launch strikes on Iran, current and former US and Arab officials told MEE. That ban has been in place since April 2025, MEE first reported. #trump#kill#khamenei#iran#US 📱American Оbserver - Stay up to date on all important events 🇺🇸

BadVolf

@BadvolfNews · Post #32 · 19.04.2022 г., 11:55

While in #Lugansk People's Republic (formerly Ukraine), I got to watch as their forces disabled the #mines placed by the #Ukrainian army; mines meant to #kill the civilians that were sent to repair the electrical power plant.