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

Резултати

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

Пребарај: #novosergeyevka

当前筛选 #novosergeyevka清除筛选
DruschbaFM - English

@druschbaFm_en · Post #52784 · 02.04.2025 г., 08:02

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 2 April⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, to the west on Ukrainian lands, there were no reports on major changes. Thus, the situation is likely as follows: 🟡#Vladimirovka- AFU; {1st blue↗️}; 🟡#Vodolagi - AFU; 🟡 Russian #Uspenovka - contested {1st black↘️}; 🟡#Veselovka - contested; 🟡#Belovody - AFU; 🟡#Zhuravka, contested; 🟡#Basovka, contested. 🟡#Novenkoye - RFAF {1st red⬆️}. 🟡 In #Kursk region, fighting continues north of the AFU controlled #Oleshnya, east of which Russian troops have (confirmed) advanced on the village. For #Guyevo the battle continues, the respective control zone of both parties is disputed. #Gornal is AFU controlled. 🔴In #KrasnayaYaruga Sector, fighting for #Popovka {6th black↙️} and #Demidovka is ongoing. 🗺 All on Map 1 🔴 In #Kharkov Direction, Russian aviation and artillery are reportedly striking the AFU's logistics routes. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, Russian units advanced west of the Oskol River towards #Kondrashovka, the battle for which has begun. Thus, the Russian claims regarding the village and #MalayaShapkovka to it's northwest, reported on 29 Mar have proven wrong. It has just been reported that Russian units have entered #Kondrashovka's north. 🗺 Map 2 🔴 In #Borovaya Sector, no major changes. 🔴In #Liman Sector, the battle at #Katerinovka and #Novoye continues. 🔴In #Seversk Sector, the most intense clashes are at #Belogorovka's chalk quarry. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, positional battles without major changes. 🔴In #Toretsk Sector, fighting in the city for the 'Toretskaya Mine' in the north, in the western outskirts and in the southern 'Zabalka Microdistrict' continued, as well as to the west for the villages of #Shcherbinovka and #Leonidovka. 🔴#Pokrovsk Direction: 🔴 On the right Flank, far to the east, the RFAF are still assaulting the southern village edge of #Valentinovka. Fighting continues around the recently taken #Panteleymonovka and for #Tarasovka further west. 🔴 South of the City, ongoing fighting along the frontline, without changes. 🔴 On the left Flank, the situation is dynamic. Reportedly, fierce fighting continues for #Udachnoye and in the #Uspenovka - #Novoaleksandrovka area. The AFU are trying to take #Uspenovka to slow down the Russian advance in #Novoaleksandrovka, the capture of which would enable further advance to #Novosergeyevka. 🟡 South of #Kotlyarovka, there was reportedly a breakthrough, Russian units cut of #Preobrazhenka from #Troitskoye and blocked the approaches to it from #Kotlyarovka. Currently, #Preobrazhenka is being cleared. The battles for #Kotlyarovka and #Bogdanovka continue. 🗺 Map 3 🔴#Komar Direction: 🔴 In #Bogatyr Sector, fighting around #Andreyevka and for #Konstantinopol continues. 🟡 For #Razliv, the RF MoD also claimed the takeover, but failed to provide evidence. The published video did not include the large buildings with blue roofs we mentioned yesterday. 🎬 Video 🔴 In #Komar Sector, at #Vesyoloye, Russian stormtroopers reportedly penetrated the AFU defences. In #VolnoyePole, fierce fighting for control over the settlement continues. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, the battles for the 4 contested villages continue. 💥 In the #DPR, an AFU UAV hit City Bus No. 2 in #Gorlovka yesterday morning, wounding 15 civilians. 💥 In #Kherson Direction, the RFAF aviation carried out a massive bombing of the right Dnieper bank. 💥#Russia: 🔵The AFU attacked with UAVs at night. In #Kursk, at least 15 explosions were reported. In #RostovRegion, two apartment buildings in #Taganrog were damaged. 💥#RestUkraine: 🔵 The RFAF struck #Kharkov, #Kramatorsk and #Odessa with UAVs. ⚠️ The Term 'Reportedly' indicates that it is unconfirmed! 🎞 Videos Source 🗺 Maps @olegtsarov; @petrenko_iHS 📋 Sources: CC; Tsarov; 🇺🇦Fiend;⚡️2M;🐈Cat😼VK 🕰As of 2 Apr 2025; 06:53 GMT+3;📃1 Apr 📱 Join GLOBAL DEPTH to boost your TG Feed 💬Join Military Chat for Comments & Discussions 🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update