@fight4f · Post #8275 · 06.05.2024 г., 13:03
荷蘭的英文版每日更新 https://ig.me/j/AbZXhCHKgod1rjEq/ #engels
Hashtags
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
Пребарај: #engels
@fight4f · Post #8275 · 06.05.2024 г., 13:03
荷蘭的英文版每日更新 https://ig.me/j/AbZXhCHKgod1rjEq/ #engels
Hashtags
@druschbaFm_en · Post #52330 · 20.03.2025 г., 08:04
⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 20 March⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, in the west, fighting continues in and near #Zhuravka, as well as southeast of it in #Basovka on Ukrainian territory. 🟡 In #Kursk region, fierce battles in the areas of the #Gogolevka and #Guyevo villages continue. 📌 Referring to Previous Reports, doubts have arisen as to whether fights are already taking place in the villages. There is still no objective control footage. We have corrected our arrows on map accordingly, which show the control and mentioned locations. 🟡#Oleshnya and #Gornal remain safe under AFU control. 🔴 In #KrasnayaYaruga Sector, south of #Sudhza in Russian #Belgorod region, further massive AFU assaults especially on #Demidovka, as well as in the areas of #Grafovka and #Prilesye have been foiled. The search for the remnants is ongoing. 🗺 All on Map 1 ✈️An AFU F16 was downed. 📌 The AFU Command is reportedly reinforcing all areas and intends to continue also the attacks on #Belgorod region. 🔴 In #Kharkov Direction, without significant changes. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, fierce fighting along the LoC continues, but without changes. 🔴 In #Borovaya Sector, the battle for #Boguslavka continues. 🔴In #Liman Sector, the RFAF advanced west of the #BalkaZhuravka settlement. 🔴In #Seversk Sector, fights in the area of #Bologorovka (#LPR) and in #Verkhnekamenskoye continue. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, the northwestern part of the city is almost completely under Russian control. The battle for the centre southwest of the 'Refractory Plant' continues. Russian troops attacked from the east with armoured vehicles. The result of the battle is disputed. 🗺 Map 2 🎬 Video 1 🔴In #Toretsk Sector, northeast of the city, RFAF units attacked northeast of the #Druzhba settlement towards positions taken by Russian assaults beyond the canal near #Ozeryanovka. 🟡 In #Toretsk itself, the RFAF expanded their zone of control. 🔴#Pokrovsk Direction: 🔴 On the right Flank and south of the city, without significant changes. 🔴 On the left Flank, the battle for #Udachnoye continues as usual. 🟡 In #Uspenovka, the fierce battle continues and towards #Novoalexandrovka southwest of it. 🟡 In #Preobrazhenka, fighting for the eastern settlement part continues. To the south, the Russian troops are attacking towards #Troitskoye and #Bogdanovka. 🔴#Komar Direction: 🔴In #Konstantinopol Sector, the RFAF advanced west of #Slavyanka and north of #Andreyevka, but were driven out of a stronghold northwest of the latter. 🟡 In #Konstantinopol, the battle continues. 🔴 In #Komar Sector, the yesterday reported Russian advance south of #Privolnoye has been confirmed, the fights for the village itself continue. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, north of #Rabotino the RFAF attack towards #Novodanilovka and further west in the direction of #Novoandreyevka. 🟡 For #Shcherbaki and #MalyeShcherbaki, the battle continues. 🟡#Stepovoye came, according to unconfirmed reports, under Russian control, as well as heights north of it. 🟡 For #Lobkovoye, the battle has begun with fights in the village (unconfirmed), alternate on its approaches. 🔴 In #Kherson Direction, without significant changes. 💥#OldRussia: 🔵In #Voronezh Region, ca. 40 AFU UAVs were downed overnight. In the #Saratov region, Zelensky tried to raid the Oil Refinery in #Engels, as a result of which the 'City Clinical Hospital No. 1' has been damaged. In the #Rostov region, another UAV attack was repelled. In #Gorlovka (#DPR), 11 civilians were wounded yesterday by Zelensky's morning shelling of the city centre. 💥#RestUkraine: 🔵 In #Kirovograd Region, in turn, after a massive Geranium UAV attack, more than 30 explosions occurred in the town of #Kropyvnytsky. 🎬 Video 2 🎞 Vids Source 1; Source 2; 🗺 Maps @olegtsarov; @creamy_caprice 📋 Sources: CC; Tsarov; ⚡️2M; 🇺🇦Fiend; 😼Kotenok 🕰20 Mar 2025; 06:44 GMT+3; #smo 📱 Join GLOBAL DEPTH to boost your TG Feed 💬Welcome to Military Chat & Ukraine Observer
Hashtags