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

Резултати

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

Пребарај: #defense

当前筛选 #defense清除筛选
Indian Development News 🇮🇳

@developmentnewsindia · Post #43483 · 12.04.2026 г., 00:19

Next-Gen Radar Tech | High-Altitude Dominance Central Acquisition Radar – Prime, designed by LRDE, DRDO and manufactured by Bharat Electronics Limited (BEL), is strengthening India’s Air defence with an indigenous Phased Array Radar engineered for extreme altitudes and unmatched vigilance. 🔹 Electronic beam steering for rapid detection of airborne threats up to 150 km 🔹 Advanced ECCM ensures reliable performance in heavy jamming environments 🔹 GaN-based radar delivering higher efficiency, extended range, and superior performance 🔹 Integrated IFF system for accurate friend-or-foe identification 🔹 Real-time data sharing for seamless integration with weapon systems 🔹 Fully automated, mobile, single-vehicle platform with an integrated energy system, operable up to 4500 m AMSL #Defense

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #43450 · 10.04.2026 г., 13:06

Indian Navy’s 6 Next Gen Missile Vessels (NGMV) will pack serious capabilities with 18 KAMEWA Waterjets from KONGSBERG Maritime. Unlike conventional propellers, waterjets draw water in, accelerate it, and eject it at high speed delivering: ✅ Superior stealth (lower acoustic signature) ✅ High-speed performance & rapid acceleration ✅ Exceptional manoeuvrability (ideal for littoral warfare) ✅ Reduced draft perfect for shallow waters ✅ Better survivability (no exposed propellers) #Defense

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #43324 · 07.04.2026 г., 08:23

"At DRDO, we have three or four laboratories that work specifically on materials... The DRDO has realised the importance of materials long back, and this is one of the thrust areas in DRDO. I would like to point out the challenges we face. It is very easy to develop materials in a laboratory. A lot of new work happens in academic institutions as well as in various DRDO labs. But very few of these get translated into industrial production." – Samir V Kamat, Chairman, DRDO #Defense

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #43321 · 07.04.2026 г., 06:11

InsideFPV executed ₹10 crore MoD kamikaze drone contract in 60 days under emergency procurement. Delivered hundreds of drones with operating range −35°C to 50°C and GPS-denied capability. Company scaling to 20,000 sq ft facility for higher-volume defence orders. #Defense

Hashtags

Egountchi Behanzin Officiel

@egountchibehanzinOfficiel · Post #6990 · 11.08.2024 г., 18:45

#DEFENSE Bonne nouvelle !! Renforcement de la coopération militaire AES - RUSSIE 🇷🇺 : le Mali 🇲🇱 et le Burkina Faso 🇧🇫 participeront au forum "Armée-2024". Les ministres de la Défense du Mali et du Burkina Faso ont confirmé leur participation au forum international militaro-technique "Armée-2024", qui se tiendra du 12 au 14 août dans la région de Moscou, au centre culturel Patriot. L'événement sera l'occasion de nouvelles discussions stratégiques. Question: Selon vous, est-ce une bonne stratégie le renforcement militaire avec la Russie pour les pays de l'AES ? Exprimez-vous @egountchibehanzinTV

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #43566 · 13.04.2026 г., 17:06

BSNL signs agreement to deliver LEO-based high-speed, secure satellite internet to the Indian Army, a move aimed at ensuring resilient, encrypted, and real time battlefield connectivity while reducing reliance on vulnerable terrestrial networks and significantly enhancing operational readiness in contested battlespaces. #Defense#Space

Interesting Planet 🌍

@interesting_planet_facts · Post #504 · 05.08.2025 г., 16:22

🌎 Australia’s frilled lizard sports a dramatic neck frill that pops up like an umbrella when threatened, making the animal appear larger and scaring away predators—nature’s instant fright mask! ✨ #reptiles⚡#adaptation⚡#defense 👉subscribe Interesting Planet

Interesting Planet 🌍

@interesting_planet_facts · Post #457 · 29.07.2025 г., 14:22

🌎 The Saturniid moth caterpillar wears a suit of bright, stinging bristles that can inject venom, deterring predators with both bold color and painful defense. ✨ #insects⚡#defense⚡#nature 👉subscribe Interesting Planet

ПретходнаСтраница 1 од 5Следна