@AirportAnalysis · Post #1766 · 04.03.2024 г., 09:06
#Tsunami Net 官网: https://user.tsunaminet.cc 群组: @TsunamiNetGroup 频道: 已关闭注册
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #205 · 22 јан.
Как работает функция reload()? Эта функция нужна для того, чтобы перезагрузить изменившийся код из py-файла без рестарта интерпретатора. Дело в том, что любой импортированный модуль при повторном импорте не будет перечитывать файл. Функция импорта вернёт уже загруженный в память объект модуля. Чтобы обновить код, нужно либо перезапустить всю программу, либо использовать функцию reload() from importlib import reload reload(my_module) 🔸 Функция reload() принимает в качестве аргумента только объект модуля или пакета. Она не может перезагрузить класс или функцию. Только весь файл целиком! 🔸 Перезагрузка пакета перезагрузит только его файл __init__.py, если он есть. Но не вложенные модули. 🔸Она не может перезагрузить ранее не импортированный модуль. 🔸При вызове функция reload() перечитывает и перекомпилирует код в файле, создавая новые объекты. После создания новых объектов перезаписывается ранее созданный неймспейс этого модуля. Это значит, что если где-то этот модуль импортирован через import и обращение к атрибутам происходит через неймспейс (имя) модуля, то такие атрибуты обновятся. Если какие-либо объекты из этого модуля импортированы через from то они будут ссылаться на старые объекты. Напишем простой модуль # mymodule.py x = 1 Теперь импортируем модуль и отдельно переменную х из модуля >>> import mymodule >>> from mymodule import x >>> print(mymodule.x) 1 >>> print(x) 1 Не перезапуская интерпретатор вносим изменения в модуль # mymodule.py x = 2 Делаем перезагрузку модуля и проверяем х ещё раз >>> reload(mymodule) >>> print(mymodule.x) 2 >>> print(x) 1 То же самое будет если присвоить любой объект переменной (даже словарь или список) Повторный импорт обновляет значение >>> from mymodule import x >>> print(x) 2 🔸Созданные инстансы классов не обновятся после перезагрузки модуля. Их придётся пересоздать. #tricks#basic
Пребарај: #tsunami
@AirportAnalysis · Post #1766 · 04.03.2024 г., 09:06
#Tsunami Net 官网: https://user.tsunaminet.cc 群组: @TsunamiNetGroup 频道: 已关闭注册
Hashtags
@AirportRosters · Post #500 · 04.03.2024 г., 09:02
#Tsunami Net
Hashtags
@interesting_planet_facts · Post #1375 · 16.04.2026 г., 22:11
🌎 A massive tsunami struck the North Sea in 6200 BCE, flooding Doggerland—a land bridge that once connected Britain to Europe. Caused by the Storegga Slide, an underwater landslide off Norway, the waves reached up to 20 meters high and permanently altered the region’s geography. ✨ #tsunami⚡#prehistory⚡#geology 👉subscribe Interesting Planet 👉more Channels
Hashtags
@airportroster · Post #1463 · 04.03.2024 г., 09:02
#编号1225#投稿 #Tsunami Net 商店截图 收录时间: 2024.03.04 官网: https://user.tsunaminet.cc 群组: @TsunamiNetGroup 频道: 说明: 关闭注册 近期测评: ✏️投稿联系
@interesting_planet_facts · Post #1048 · 17.11.2025 г., 22:11
🌎 The 1755 Lisbon earthquake was one of the most destructive natural catastrophes in European history. The quake, followed by a tsunami and fires, destroyed much of Lisbon and killed up to 50,000 people. Its impact led to major advances in seismology and influenced Enlightenment thinking about disasters. ✨ #earthquake⚡#tsunami⚡#history 👉subscribe Interesting Planet 👉more Channels
Hashtags
@interesting_planet_facts · Post #900 · 12.10.2025 г., 22:11
🌎 An enormous tsunami struck the Indian Ocean on December 26, 2004 after a magnitude 9.1 earthquake off Sumatra. Waves up to 30 meters high inundated coasts in 14 countries, killing over 230,000 people and displacing millions, making it one of the deadliest natural disasters in recorded history. ✨ #tsunami⚡#earthquake⚡#history 👉subscribe Interesting Planet 👉more Channels
Hashtags
@interesting_planet_facts · Post #1199 · 06.01.2026 г., 22:11
🌎 The Krakatoa volcanic eruption in Indonesia in 1883 unleashed one of the loudest sounds ever recorded, heard over 4,800 kilometers away. The blast triggered tsunamis up to 40 meters high, destroying coastal towns and killing more than 36,000 people. ✨ #catastrophe⚡#volcano⚡#tsunami 👉subscribe Interesting Planet 👉more Channels
Hashtags
@interesting_planet_facts · Post #668 · 01.09.2025 г., 13:22
🌎 A colossal tsunami struck Japan’s Sanriku coast in 1896, triggered by an undersea earthquake. Towering waves up to 38 meters high destroyed villages and claimed nearly 22,000 lives, prompting global advances in seismic and tsunami warning systems. ✨ #tsunami⚡#history⚡#disasters 👉subscribe Interesting Planet
Hashtags
@voir_yeux · Post #12596 · 20.04.2026 г., 11:56
🇯🇵 Des vagues de tsunami de 70 cm de haut ont touché la côte de la préfecture d'Iwate, dans le nord-est du Japon, après un tremblement de terre de magnitude 7,5 enregistré à l'est de la côte Pacifique de la région nord-est de Tohoku, a indiqué l'Agence météorologique japonaise. Une alerte tsunami (avec des vagues pouvant atteindre trois mètres) a été déclenchée pour les préfectures de Miyagi, Iwate et Aomori, ainsi que pour la côte sud d'Hokkaido. Selon la chaîne NHK, les vagues ont été détectées à 5-20 km des côtes. #japon#tsunami#vagues
@ZCL_Public · Post #306 · 09.03.2024 г., 03:59
#第三档 注意:现在不稳定且速度有所减慢 请自行鉴别! #tsunami#tnet 20/100G/季 10/180G/月 这什么速度啊?! 这是什么啊?? 解锁全绿 速度超标 节点倍率 x1 邀请制 必须使用邀请码 官网:点此进入 群组:点此进入 😅个人意见:1月新机场 稳定性待考察 但是这个速度这个解锁这个价格 同价位很难有能打的了 十分建议够买试水! 🐥注意:任何机场均有跑路的风险,为了您的财产安全,请优先购买月付!
@amazingeo · Post #433 · 04.11.2025 г., 12:31
🌍 Earthquakes under the ocean can create tsunamis—giant waves traveling at jet speed. A tsunami may cross an entire ocean before reaching land with just minutes’ warning. ✨ #tsunami⚡#earthquake⚡#hazards⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels
@amazingeo · Post #128 · 27.08.2025 г., 20:12
🌍 The 2004 Indian Ocean tsunami sent waves up to 30 meters high across 14 countries. This natural disaster traveled as fast as a jet plane, reaching Africa in mere hours. ✨ #tsunami⚡#disasters⚡#waves⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍