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

Резултати

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

Пребарај: #topoli

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

@druschbaFm_en · Post #52476 · 24.03.2025 г., 08:03

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 24 March⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, west of the embattled #Zhuravka on Ukrainian lands, the RFAF entered the northern outskirts of #Vladimirovka (or came close to; another black arrow on map). 🟡 In #Zhuravka, the battle continues. 🟡 In #Basovka, the RFAF advanced in its southern part. 🟡 At #Novenkoye, the RFAF advanced (1st red arrow). 🟡 In #Kursk region, the situation remained unchanged. #Rubanshchina remains Russian controlled (2nd red arrow), #Gogolevka, #Oleshnya, #Guyevo and #Gornal remain under AFU control for now (4 large blue arrows on map). 🟡 In #Melovoy, the battle continues (small black arrow). 🔴 In #KrasnayaYaruga Sector, the AFU continued to attack and could enter #Demidovka and gain a foothold in the ruined village's southern part. This morning, the battle for it and the adjacent forest plantations continues (red arrow turned to black). 🟡#Grafovka, remains under RFAF control. 🟡#Prilesye as well. 🗺 All on Map 1 📌Given the Events, the 1st AFU's minor interim result at high costs is of no strategic value whatsoever. On the contrary, the overall situation of the AFU has even worsened with the further aforementioned border crossing. 🔴#Kharkov Direction: 🔴In #Liptsy Section, positional battles are taking place. The frontline remained unchanged. 🔴 In #Volchansk Section, the same situation. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, Russian troops advanced in the eastern and western settlement parts of #Topoli and expanded the bridgehead towards the settlement of #Kamenka from the east. 🟡 In #Dvurechnaya, Russian infantry units advanced within the settlement boundaries. 🔴 In #Borovaya Sector, the AFU retook the settlement of #Nadiya and advanced in its area. 🎬 Video 1 🔴In #Liman Sector, without significant changes. 🔴In #Seversk Sector, as well. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, there are reportedly fights in the city's southern 'Shevchenko Microdistrict,' and further south towards #Stupochki village. 🔴In #Toretsk Sector, fighting continues in the northern, central and southern parts of the city. 🔴#Pokrovsk Direction: 🔴 On the right Flank, the RFAF have entered the village of #Vodyanoye2nd west of #Tarasovka. 🗺 Map 2 🎬 Video 2 🔴 South of the City, the heavy fighting continued without any noteworthy results. 🔴 On the left Flank, there are ongoing heavy battles also without any tangible results. 🔴#Komar Direction: 🔴In #Konstantinopol Sector, fighting in and around the village of the same name and throughout the sector is ongoing. 🔴 In #Komar Sector, the battles continued without major changes. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, fighting continues in #MalyeShcherbaki, to which Russian troops broke through several days ago and to the west near #Stepovoye. 🔴 In #Kherson Direction, the AFU have still presence in the area of ​​the 'Antonovsky Bridge,' where the RFAF disrupted another AFU rotation. Otherwise Russian artillery and Aerospace Forces are hitting AFU positions and facilities. 💥#OldRussia: 🔵 In #Rostov Region, Russian air defence repelled a massive AFU drone attack on several districts, as well as in #Novoshakhtinsk and on the approach to Rostov at night. In one of the #Voronezh region districts, more than five UAVs were destroyed. In the evening, the RF MoD reported dozens of destroyed drones in the #Crimea, #Belgorod, #Bryansk and #Kursk regions. In #Zaporozhye region, the AFU targeted an ambulance, killing a paramedic. In Pologi district the AFU disrupted the power supply. In the #DPR, 7 civilians were wounded by AFU strikes. ⚠️ This Report contains new info received after the usual 2-Majors morning report. 🎞 Vids Source 1; Source 2; 🗺 Maps @olegtsarov; @creamy_caprice 📋 Sources: CC; Tsarov; ⚡️2M; 🇺🇦Fiend;😼Kotenok 🕰As of 24 Mar 2025; 07:39 GMT+3;📃22 Mar 📱 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

DruschbaFM - English

@druschbaFm_en · Post #52278 · 19.03.2025 г., 08:04

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 19 March⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, to the west in #Ukraine, fights in and around #Zhuravka. To the southeast... 🟡 In #Basovka, the RFAF have advanced and the battle has shifted to the southern settlement part. 🟡 In #Kursk region, the battles for the villages of #Gogolevka and #Guyevo continue. 🟡#Oleshnya and #Gornal remain under AFU control. 🗺 Map 1; added arrows show the mentioned locations, black contested 🔴 In #KrasnayaYaruga Sector, the AFU crossed the border in the area of ​​the #Demidovka, #Grafovka and #Prilesye villages south of #Sudhza in #Belgorod region. Several attack waves have been stopped by destroying armoured vehicles. The AFU remnants tried to get a foothold. Fights on Russian territory, especially towards #Demidovka with tank support continued. According to the latest unconfirmed report, the invaders have withdrawn to their initial positions in #Sumy region. 🎬 Video 1 🗺 Map 2 🔴#Kharkov Direction: 🔴In #Liptsy Section, the AFU counterattacked unsuccessfully in the settlement area of #​​Glubokoye. 🔴 In #Volchansk Section, the battle for the city continues. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, to the north, the RFAF are advancing from #Topoli southwestwards towards #Kamenka, the eastern approaches of which are also attacked. Furthermore Russian troops advance from the south on the village. 🟡 Near #Krasnoye1st(Pervoye), to the southwest, Russin units are advancing on the settlement. 🟡#Figolevka, located further southwest, has been recaptured by the AFU. 🟡 North of #Kupyansk, Russian units are expanding the bridgehead northeast of #Kondrashovka. 🟡 Northeast of #Kupyansk, the AFU counterattacks in the area of #Petropavlovka. 🔴 In #Borovaya Sector, fierce fighting in the northern outskirts of #Boguslavka continues. 🔴In #Liman Sector, Russian troops have advanced to #BalkaZhuravka's northern settlement outskirts and continue to attack in the westerly direction. 🟡 North of #Torskoye, positional battles are taking place. 🔴In #Seversk Sector, fights in the area of #Bologorofka (#LPR) continue. The AFU still hold positions on the Chalk Quarry (White Mountain) south of the village. 🟡 In #Verkhnekamenskoye, fights for the centre. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, fierce battles continue. The AFU counterattacks. 🔴In #Toretsk Sector, the situation is unchanged. 🔴#Pokrovsk Direction: 🔴 South of the City, heavy battles and counterattacks continue. The situation is dynamic. 🟡#Shevchenko has been recaptured by Russian forces. The AFU counterattacks. 🟡 In #Peschanoye, the same situation as for #Shevchenko. 🟡 In #Kotlino, the northwestern outskirts and the cemetery area are embattled. 🔴 On the left Flank, the battle for #Udachnoye continues. 🔴#Komar Direction: 🔴In #Konstantinopol Sector, west of #Andreyevka, the AFU have pushed back Russian assault groups, which attacked towards #Alekseyevka. 🟡 In #Konstantinopol, the RFAF lost control over the village. The AFU have advanced into its centre. 🎬 Video 2 🟡 South of #Konstantinopol, the RFAF expanded their control zone by more than 1 km. The battle for the village continues. 🟡 From #Razdolnoye, Russian units advanced northwards towards #Razliv and #Bogatyr. 🔴 In #Komar Sector, northwest of #VelikayaNovosyolka, the RFAF are building on their success at #Burlatskoye. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, we have to clarify that according to objective evidence data, #Shcherbaki, #MalyeShcherbaki and #Stepovoye are still contested. 🔴 In #Kherson Direction, no changes. 💥#OldRussia: 🔵 In #Krasnodar Territory, the AFU struck the 'Kavkazskaya Oil Transshipment Point.' This, after the Trump - Putin call. 🎞 Video 1 Source; 🎞 Video 2 Source 🗺 Maps @olegtsarov 📋 Sources: CC; Tsarov; ⚡️2M; 🇺🇦Fiend; 😼Kotenok 🕰19 Mar 2025; 06:43 GMT+3; #smo 📱 Join GLOBAL DEPTH to boost your TG Feed 💬Welcome to Military Chat & Ukraine Observer 🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update