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

Резултати

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

Пребарај: #iis

当前筛选 #iis清除筛选
Embassy of Russia in Singapore

@rusembsg · Post #4291 · 24.10.2025 г., 04:19

🗓 On October 20-22, Deputy Russian Foreign Minister Sergey Vershinin, heading the Russian interagency delegation, took part in the 10th Singapore International Cyber Week and the Special Session of the ASEAN Ministerial Conference on Cybersecurity with Dialogue Partners held within its framework. Participants of the event emphasized the importance of recognizing the global nature of growing threats in the digital environment. The results of the now-concluded UN Open-Ended Working Group (#OEWG) focused on the security of and in the use of information and communications technologies (ICT) were highly commended. A commitment was expressed to work jointly within the framework of the forthcoming Permanent Global Mechanism on ICT Security and Responsible State Behaviour in Cyberspace, which will replace the OEWG. The signing of the UN Convention against Cybercrime in Hanoi, Viet Nam (October 25-26), was noted as an important milestone. On the sidelines of the Forum, DFM Vershinin held bilateral meetings with UN Under-Secretary-General and High Representative for Disarmament Affairs, Izumi Nakamitsu, Singapore’s Minister of State for Foreign Affairs and Trade & Industry, Gan Siow Huang, Permanent Secretary of the Ministry of Foreign Affairs of Singapore, Albert Chua, Chief Executive of the Cyber Security Agency of Singapore David Koh, Permanent Representative of Singapore to the UN, Burhan Gafoor, and Head of the Cyber Defense and Security Division of the Ministry of Foreign Affairs of Brazil, Larissa Calza. The meetings and bilateral contacts confirmed ASEAN countries’ receptiveness to the key elements of Russia’s approaches to international information security (#IIS). In particular, Russia’s arguments were supported regarding the central role of the UN in the negotiation process on ICT security issues, including artificial intelligence, as well as the need to develop legally binding norms to prevent and resolve conflicts in cyberspace based on the principles of sovereign equality and non-interference in the internal affairs of states.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1911 · 22.10.2025 г., 18:27

🗓 On October 20-22, Deputy Russian Foreign Minister Sergey Vershinin, heading the Russian interagency delegation, took part in the 10th Singapore International Cyber Week and the Special Session of the ASEAN Ministerial Conference on Cybersecurity with Dialogue Partners held within its framework. Participants of the event emphasized the importance of recognizing the global nature of growing threats in the digital environment. The results of the now-concluded UN Open-Ended Working Group (#OEWG) focused on the security of and in the use of information and communications technologies (ICT) were highly commended. A commitment was expressed to work jointly within the framework of the forthcoming Permanent Global Mechanism on ICT Security and Responsible State Behaviour in Cyberspace, which will replace the OEWG. The signing of the UN Convention against Cybercrime in Hanoi, Viet Nam (October 25-26), was noted as an important milestone. On the sidelines of the Forum, DFM Vershinin held bilateral meetings with UN Under-Secretary-General and High Representative for Disarmament Affairs, Izumi Nakamitsu, Singapore’s Minister of State for Foreign Affairs and Trade & Industry, Gan Siow Huang, Permanent Secretary of the Ministry of Foreign Affairs of Singapore, Albert Chua, Chief Executive of the Cyber Security Agency of Singapore David Koh, Permanent Representative of Singapore to the UN, Burhan Gafoor, and Head of the Cyber Defense and Security Division of the Ministry of Foreign Affairs of Brazil, Larissa Calza. The meetings and bilateral contacts confirmed ASEAN countries’ receptiveness to the key elements of Russia’s approaches to international information security (#IIS). In particular, Russia’s arguments were supported regarding the central role of the UN in the negotiation process on ICT security issues, including artificial intelligence, as well as the need to develop legally binding norms to prevent and resolve conflicts in cyberspace based on the principles of sovereign equality and non-interference in the internal affairs of states.

Hashtags

MDC Uzbekistan

@mdcuzbekistan · Post #651 · 04.02.2023 г., 15:47

.NET loyihalari, windows server, domain integratsiya Oramizdagi barcha .NET ahli qanday qilib api yozishni biladilar. Yoki umuman bir loyihani "loyiha" qilishni uddalaydilar. Ammo u bitganidan so'ng uni serverga qo'yish haligacha muammo bo'lib kelmoqda. Keling, ushbu muammoni yengilgina hal qilishni o'rganamiz. Yani windows server va domain sotib olib, ularni loyihamiz bilan integratsiya qilamiz. Aytgancha, SSL muammolari ham bor. Barchasini bitta qilib, bir darsda namoyish qilishga harakat qilamiz. Bu safargi speaker - kamina, Muhammadkarim. Barchangizni ushbu mahorat darsida kutib qolamiz. Kirsangiz xursand bo'lamiz, kirmasangiz hafa bo'lish yo'q ) Sana: 5-fevral, 20:00 Havola: Zoom Speaker: Muhammadkarim To'xtaboyev #iis#windowsserver#domain#hosting .NET Uzbekistan Community ➖➖➖➖➖➖➖➖➖➖ Telegram | Instagram | Youtube