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

Резултати

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

Пребарај: #semanasanta

当前筛选 #semanasanta清除筛选
Descubre en México

@noticiastln · Post #2200 · 26.03.2024 г., 23:45

https://descubreenmexico.com/por-que-la-semana-santa-cambia-cada-ano-de-fecha/ #SemanaSanta Este mes de abril muchos mexicanos y cristianos celebran la Semana Santa, es decir, la conmemoración anual de la Pasión de Cristo. ¿Qué es la pasión de Cristo? Esta semana relata la entrada de Jesús a Jerusalén, su última cena, el viacrucis, su muerte y resurrección. ¿Cuándo es la Semana Santa este año? Este año, la Semana Santa se celebra desde el domingo 24 de marzo hasta el domingo 31 de marzo.

Hashtags

SIN LÍNEA MX (OFICIAL)

@SINLINEAMXnoticias · Post #31250 · 03.04.2026 г., 20:40

¡Ardor para la fachiza! El #AIFA sigue ganado visitantes nacionales e internacionales. A la derecha no le gusta saber que México avanza, por eso inventan historias de fracasos. #SemanaSanta#AIFA

SIN LÍNEA MX (OFICIAL)

@SINLINEAMXnoticias · Post #31225 · 02.04.2026 г., 13:49

¡Atención! ☝🏻 🔴 El gobierno de #DelfinaGómez (@delfinagomeza) llamó a la población a evitar el uso de fogatas y pirotecnia en zonas forestales durante el periodo vacacional de #SemanaSanta🌳🪵👇🏻 https://revistaelpolitico.com/estados/gobierno-del-edomex-pide-proteger-bosques-semana-santa/

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40895 · 03.04.2026 г., 16:38

In Spain, Good Friday is part of Semana Santa (Holy Week). Cities hold large religious processions. Groups called brotherhoods organize these events. People wear long robes and pointed hoods. They walk slowly as an act of penance. Huge floats called “pasos” show scenes from the crucifixion of Jesus. These can weigh over a ton and are carried by teams underneath. Some cities have music with drums and bands. Others stay completely silent. People also sing emotional songs from balconies. In Seville, processions can last all night. In Málaga, there is a tradition of pardoning a prisoner. In Valladolid, old sculptures from the 16th and 17th centuries are used. Traditional foods include torrijas and buñuelos. 🇪🇸🕯️🎭🥁 [Read more 1] [Read more 2] @googlefactss #GoodFriday#SemanaSanta#Spain#Traditions#History#Culture