TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #199 · 8 јан.

Многие из тех кто активно работал с Python2 несколько удивлены, почему в Python3 удобная функция reload() переехала из builtin в imp а потом и в importlib? Ну было же удобно! А теперь лишний импорт😖 Дело в том, что начиная с Python3.3 функция reload() переписана на Python вместо Cи. Что это нам даёт? 🔸 Такой код проще поддерживать и развивать 🔸 Python код легче читать, изучать и понимать. Сравните это ➡️ и это ➡️. 🔸 Как результат пункта 2, проще писать свои расширения импорта. Например, пользовательский импортёр с какой-либо хитрой логикой по аналогии с импортом из zip архивов. А есть ли у этого решения недостатки? Да, они всегда есть. 🔹 Так как это не builtin функция, её следует импортнуть перед использованием 🔹 Скорость замедлилась примерно на 5%. Очевидно, что это совершенно не критично. К тому же от версии к версии логика импорта будет оптимизироваться и ускоряться. В самом начале файла importlib/__init__.py мы видим такой импорт: import _imp # Just the builtin component, NOT the full Python module То есть часть функционала по прежнему написана на Си, но достаточно низкоуровневая. #basic

Hashtags

Резултати

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

Пребарај: #rgs

当前筛选 #rgs清除筛选

🎉The Sverdlovsk Regional Branch of the Russian Geographical Society (RGS) turns 79 today! Founded on March 5, 1946, the Sverdlovsk RGS unites researchers, travelers, and geography enthusiasts. Sergey Mazurkevich, a member of the Board of Trustees and Honorary Consul of South Africa, along with the staff of the Honorary Consul’s office, sincerely congratulate their colleagues on this special occasion! 📍 The headquarters of the Sverdlovsk RGS is located in Yekaterinburg at Ural State Pedagogical University (USPU). 🔗 The website: https://www.rgo.ru/ru/ekaterinburg #RGS#Yekaterinburg#USPU#geography#Mazurkevich

خانه روسی در تهران

@Rossotrudnichestvo_in_Iran · Post #802 · 05.09.2024 г., 10:42

🇷🇺🌊🌊🌊 🇮🇳 On September 2, Ratish Nair, Honorary Consul of Russia in Trivandrum (Karnataka, India), began a journey along the route of Afanasy Nikitin. The ambitious project is dedicated to the 555th anniversary of the famous "Journey Beyond Three Seas". 📍 The starting point of the journey was the embankment named after the famous Russian traveler Afansy Nikitin in Tver. ⚡️ Ratish Nair met Senator of the Federation Council of Russia from the Tver Region Lyudmila Skakovskaya and Rector of Tver State University Sergei Smirnov. I am sure that this is a wonderful undertaking - repeating the route of the Tver merchant Afanasy Nikitin. This will help educational and outreach work, draw attention to the traveler's personality, and strengthen ties between our countries. I am sure that in our country, preserving and studying history is one of the most important areas of work, the Senator emphasized. Even in India, not everyone knows that Afanasy Nikitin is the first foreigner who came to our country for peaceful purposes. Friendly relations between India and Russia should be strengthened. This is the main goal of my trip. I am sure that the trip, repeating the path of the Russian traveler, will help to show Russia as it is and open it to foreigners without speculation and fakes, said Ratish Nair. 🗣The meeting participants discussed the opening of Russian online educational courses in Russian in the Indian state of Karnataka, as well as other educational initiatives. 🗺 The head of the Russian House in Trivandrum will visit four more countries after Russia. His route, like 555 years ago, will lie from Tver to Astrakhan along the Volga river, then by car to Derbent, from there to 🇦🇿Azerbaijan, then to 🇮🇷 Iran, from there by plane to 🇴🇲 Oman, and then to 🇮🇳 India. This project is organized by #Rossotrudnichestvo, the Russian Ministry of Foreign Affairs (#MFA), the #RusskiyMirFoundation, and the Russian Geographical Society (#RGS, #RGO), with #Rosatom and #Sber as partners. #RussianHouse#RussianHouseTrivandrum#JourneyBeyondThreeSeas #Voyage555