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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #weird

当前筛选 #weird清除筛选
Journey to Fluency

@fluencyinenglish · Post #7334 · 21.09.2019 г., 18:51

#weird-truth @fluencyinenglish 🔹Old Funeral Customs: Placing Coins on the Eyes of the Dead @fluencyinenglish At Stillinger Family Funeral Home in Greenfield, Indiana, we get questions all the time about old funeral customs like this one: What’s the meaning of placing coins on the eyes of the dead? Like many customs and traditions, this one goes way back – in this case to the times of Greek mythology. Placing coins on the eyes of the dead was intended to “pay the ferryman”. Let’s take a closer look at this old funeral custom: ❇️Paying the Ferryman @fluencyinenglish According to often accepted interpretations of Greek mythology, it was essential to pay the ferryman. What does this mean? Charon was the name of a mythological boatman who would transport the souls of the departed across the River Styx; in essence, this was a journey from the land of the living to the land of the dead. To ancient Greeks and others, not making this journey meant not passing on to the afterlife, but instead remaining behind to wander the banks of the River Styx. Because Charon needed to be paid for the journey, coins were placed on the body. @fluencyinenglish In the Mouth or On the Eyes? It appears the earliest manifestations of paying the ferryman called for placing a single silver or gold coin under the tongue of the dead. This was called Charon’s Obol (the obolus was a silver coin in ancient Athens, Greece). The custom eventually came to include the alternative practice of placing a coin ON the mouth of the deceased, as opposed to under the tongue. @fluencyinenglish It is not exactly clear when the tradition evolved to include the practice of placing two coins on the eyes of the departed. Modern iterations of this practice may call for placing pennies or quarters on the closed eyes. It is also believed that placing coins on the eyes of the dead was historically done to make sure the eyes remained closed – out of the superstitious fear that looking into the eyes of the deceased would reveal our own death. @fluencyinenglish From Timeless Traditions to Modern Funeral Services While many old funeral traditions – such as placing coins on the eyes of the dead – may be regarded as outmoded superstitions with no basis in fact or science, many people still regard them as comforting customs to help them find peace with the passing. @fluencyinenglish

Hashtags

Страхи мужика

@waitmanfear · Post #2407 · 19.02.2023 г., 10:50

Графический дизайнер Роб Шеридан показал нью-йоркскую неделю высокой моды в стиле «вечно мучающихсядемонов ада, на которых садистски вырезаны произведения боди-арта, пропитанные кровью». Ужасно-прекрасно r/#weird

Hashtags