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

Пребарај: #responsibility

当前筛选 #responsibility清除筛选
EKOLOG.UZ| ENG

@ekologuzenglish · Post #11063 · 05.01.2026 г., 01:02

🏢 The State Duma warns residents about the risk of rodent infestations 🐀 If there are no cats in the basements, “attacking wildlife” can appear. By sealing vents and boarding up basements, management companies violate government regulations and common sense. Vladimir Burmatov, First Deputy Chairman of the State Duma Committee on Ecology, noted that this does not help residents — on the contrary, it creates a threat. It is important for cats to have a safe place to shelter from the cold and naturally control rodent populations. Protect your homes and the environment! 🐾 #Ecology#AnimalProtection#Responsibility#RodentControl ☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube.

EKOLOG.UZ| ENG

@ekologuzenglish · Post #11053 · 03.01.2026 г., 08:04

❗️ Attention! Animal Cruelty Alert In Uzbekistan, cases of intentional harassment of birds, including falcons, have been reported on social media by Instagram users under the account @ake.falcon1. These actions occur not in the wild, but in suburban and residential areas where people, children, and domestic animals are present. ✅ Key points: This is not hunting and not a tradition, but deliberate cruelty. Such actions pose a danger to animals and people alike. 📌 Legislation: According to the Law of the Republic of Uzbekistan “On the Protection and Use of the Animal World” (Art. 43) and Cabinet of Ministers’ regulations, as of January 1, 2025, it is prohibited to: Keep any species of falconiform birds (Clause 35) Use them for harassment Publish videos showing acts of violence Violation of these norms constitutes a direct breach of the law. ⚠️ Calls to action: Notify the National Committee for Ecology and Climate Change Engage law enforcement to assess the offenders’ actions Raise public awareness about legal responsibility 🔴 Important: Public cruelty must not go unpunished. Ignoring it today shifts the boundaries of what is acceptable tomorrow. 💡 Respect for animals is a hallmark of a civilized society. Everyone is responsible for preventing violence. #Ecology#AnimalProtection#Responsibility#Uzbekistan#PR#SocialAwareness☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube.

EKOLOG.UZ| ENG

@ekologuzenglish · Post #11165 · 12.01.2026 г., 08:02

🌱 Falsification in the “Green Space” Project and the Question of Responsibility! In the Yakkabog district of Qashqadaryo region, as part of the “Green Space 2025” project, unsown tree seedlings were entered into the electronic platform as planted, which distorts the official reports. Instead of fairly implementing the wise environmental policy of our respected President, some managers intimidated employees, artificially inflating the numbers: as a result, it appears that 70–80% more trees were added in the green area. According to the whistleblower, the head of the Yakkabog district ecology department handed over the electronic platform key to the municipal improvement employees, which allowed incorrect data about the trees to be entered. The actions of Y. Jumayev should be thoroughly investigated by the Committee on Ecology, and the managers involved in the falsification should be held accountable. 🌿 Protecting nature is the responsibility not only of employees but of society as a whole! #GreenSpace#Ecology#Qashqadaryo#Responsibility#Justice#SaveNature ☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube