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

Резултати

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

Пребарај: #buddhism

当前筛选 #buddhism清除筛选
Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40743 · 06.03.2026 г., 15:03

The Sukhothai Kingdom was a Siamese kingdom in Mainland Southeast Asia. It was centered in north-central present-day Thailand. It existed from 1238 to 1438. It later became part of the Ayutthaya Kingdom. The kingdom grew strong under rulers like Si Inthrathit and Ram Khamhaeng. People spoke Old Thai and practiced Theravada Buddhism. 🏯🇹🇭📜 [Read more] @googlefactss #Sukhothai#ThaiHistory#SoutheastAsia#Ayutthaya#Buddhism

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40756 · 07.03.2026 г., 07:04

Theravāda Buddhism means “Teaching of the Elders.” It is the oldest surviving school of Buddhism. It follows the Pāli Canon. It teaches the Four Noble Truths: life includes suffering; suffering is caused by craving; suffering can end; the path ends suffering. The Noble Eightfold Path is: right view, right intention, right speech, right action, right livelihood, right effort, right mindfulness, and right concentration. The goal is Nibbāna, freedom from rebirth. Meditation and moral conduct are central practices. 🧘‍♂️📜🌏 [Read more] @googlefactss #Buddhism#Theravada#FourNobleTruths#EightfoldPath#WorldReligions

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40767 · 09.03.2026 г., 07:03

Some Buddhists serve as soldiers even though Buddhism teaches non-violence. Soldiers can protect people, and Buddhism considers the intention behind actions. Actions that reduce suffering can be acceptable according to Buddhist ethics. Concepts like karma and skillful action are important. International humanitarian rules guide soldiers to act carefully. Being a Buddhist does not always mean being completely against war. Martial arts like Kung Fu also connect to Buddhism. They teach discipline, self-control, mindfulness, and protecting others. The goal is training the mind and body, not just fighting. 🕉️⚔️🥋 [Read more] @googlefactss #Buddhism#Ethics#Soldiers#NonViolence#Karma#Protection#SkillfulAction#KungFu#MartialArts#Mindfulness