Подразумеваемые неймспейсы или неявные пакеты.
Этот функционал добавлен в 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
#Fergana
📢 Cases of illegal extraction and sale of fertile soil are increasing in the Fergana Valley!
In the Rishton district of Fergana region (Chek Jalaer MFY) and in the riverbank areas of Bog‘dod district, a serious ecological problem has been observed. According to local residents, fertile soil layers have been dug up and sold in these areas for a long time.
What is particularly concerning is that these activities are happening even within the 13-meter protection zone of water-melioration areas. In some locations, soil has been excavated to depths of 9–10 meters. This can lead to:
— a sharp decrease in soil fertility,
— loss of agricultural lands,
— damage to irrigation and water systems,
— potential landslides and disruption of ecological balance in the future.
❗️ The question arises:
Who is monitoring these activities?
This issue requires attention from:
Fergana Regional Ecology Department, Land Resources and Cadastre Service, Water Management Organizations, and local hokimiyats.
Fertile soil is a natural resource formed over centuries. Destroying it for short-term gain is not only a legal violation but also a responsibility toward future generations. 🌱
☘️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.
✅ Farg‘ona viloyati Raqamli texnologiyalar markazida mGovAward tanlovi bo‘yicha seminar bo‘lib o‘tdi
📺 Shu haqda “Yoshlar” telekanali tomonidan maxsus lavha tayyorlanib, efirga uzatildi.
🔹🔹🔹
✅ В Учебном центре цифровых технологий в Ферганской области прошел учебный семинар в рамках конкурса mGovAward.
📺 Об этом на телеканале «Yoshlar» подготовил специальный репортаж.
#mitc
#mgovaward
#fergana📌 Telegram|Twitter|Facebook|Instagram|Youtube
✅ Farg‘ona viloyati Raqamli texnologiyalar markazida mGovAward tanlovi bo‘yicha seminar bo‘lib o‘tdi
Batafsil: 👉https://mitc.uz/uz/news/view/3688
🔹🔹🔹
✅ В Учебном центре цифровых технологий в Ферганской области прошел учебный семинар в рамках конкурса mGovAward
Подробно: 👉https://mitc.uz/ru/news/view/3688
#mitc
#mgovaward
#fergana
📌 Telegram|Twitter|Facebook|Instagram|Youtube
❇️Grafik dizayner
💵 Maosh: Tajribaga qarab (1000$)
Ish turi: Ofis ishi
Manzil: Farg'ona
Kompaniya: WeaYaa - GameDev kompaniyasi
- Ish haqida ma‘lumot: Koreya o'yin kompaniyasi O'zbekistonda o'z filialini ochilmoqda. Ushbu kompaniyaga o'yin uchun dizayn ishlab chiquvchi dizaynerlar kerak;
- Ish tajribasi: sketching, o'yin personajlari yaratish va grafik planshetda chizish qobiliyati;
- Photoshop, illustrator yoki sketching dasturlarida ishlash talab etiladi
📨 Aloqa: @creatornsl
#grafikdizayner#dizayn#fergana
——————————
👉@freelanceteam_uz
Люди в Фергане
Второй раз я оказываюсь в этом восхитительном городе и каждый раз нахожу что-то новое. Самым прекрасным открытием для меня здесь стали люди: их непревзойденная вежливость и доброта просто поражают.
С самого начала, с первых встреч, вы почувствуете это. Скорее всего, первыми людьми, с которыми вы столкнетесь, будут таксисты. Как будто мне всегда выпадает тариф «бизнес»))
Но это отнюдь не исключительность профессии: любой прохожий на улице готов оказать помощь, и делает он это с теплом и душевностью.
Важно отметить, что местные жители общаются друг с другом на «Вы», что становится подтверждением их уважительного отношения и особого менталитета.
В общем, это место я просто обожаю!
#Fergana#Uzbekistan#travel
#Fergana🚨 Measures taken against cockfight organizers in Qushtеpa district, Fergana region!
Individuals who regularly organized fights involving roosters, dogs, and quails were identified and held accountable. Such fights are considered gambling and constitute cruelty to animals.
While some may see this as ordinary or even amusing, such “gambling venues” are extremely dangerous for society. It was revealed that not only adults but also children participated. If a child bets on animal suffering from a young age, what can be expected when they grow up?
⚖️ Reminder: rooster, quail, and dog fights are classified as gambling. In this case, the organizers in Qushtеpa district, Fergana region, were held accountable under Article 191 of the Code of Administrative Responsibility — “Illegal participation in other games based on gambling and risk.”
#Fergana#Qushtеpa#AnimalProtection#Gambling#NoCruelty
☘️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.
Fergana Region, Fergana District, Mindonobod Neighborhood: We can’t breathe, please help!
Our homes are located near an asphalt plant, and due to its operations, dust and emissions enter our homes every day. If you step outside around 5–6 a.m., you can see the air is covered in haze. This situation seriously affects the health of our children: allergies and respiratory problems are increasing.
We have repeatedly submitted complaints through the clinic, neighbors, and other organizations, and sent letters to higher authorities, but no measures have been taken. The environmental agency has also failed to address the problem.
In addition, next to the asphalt plant, there are Megamix and Alibaster production facilities, whose emissions further worsen the air quality.
We are calling on the public and responsible authorities: please pay attention to this air pollution and the threat it poses to our children’s health, and take the necessary measures!
#Fergana#Mindonobod#Environment#AirPollution#ChildHealth#AsphaltPlant
☘️ Follow the latest environmental news on @ekologuz. Send your suggestions and feedback via @eklguz_bot.