Вторая по частоте 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
The Trump administration has renamed the U.S. Institute of Peace after President Donald Trump and has planted the president’s name on the organization’s headquarters despite an ongoing fight over the institute’s control.
It’s the latest twist in a seesaw court battle over who controls the U.S. Institute of Peace, a nonprofit think tank that focuses on peace initiatives. It was an early target of the Department of Government Efficiency this year.
On Wednesday, the State Department said it renamed the organization to the Donald J. Trump Institute of Peace to “reflect the greatest dealmaker in our nation’s history.” The new name could be seen on its building, which is near the State Department.
Trump has spent months openly lobbying for a Nobel Peace Prize even though he was passed over for this year’s installment — arguing he had a hand in easing a series of conflicts around the world. But Trump has also ordered strikes on suspected drug vessels off the coast of Venezuela and repeatedly threatened that attacks on land could be coming, which would be an act of war against that country.
#Trump#Nobel
👂More on Trump's Ear
According to the article, Trump’s campaign “buttered up functionaries and journalists” and even reached out to Norwegian Finance Minister and former NATO secretary general Jens Stoltenberg to try to influence the committee.
Some worried that Trump would impose additional tariffs on Norway if he did not receive the prize, noting, “a year ago it would have been unthinkable… but now… it’s no longer beyond the limits of what’s possible.”
The White House criticised the Nobel Committee’s decision, stating that it “proved they place politics over peace,” as White House Spokesman Steven Cheung said on the same platform, adding, “President Trump will continue making peace deals, ending wars, and saving lives. He has the heart of a humanitarian, and there will never be anyone like him who can move mountains with the sheer force of his will.”
#Trump#Nobel
👂More on Trump's Ear ⚠️
#Efemérides || 11 de octubre de 1990
A través de un comunicado la Academia Sueca anunciaba a Octavio Paz como el ganador del premio #Nobel de Literatura. Así empezó su discurso al recibir el galardón:
"Comienzo con una palabra que todos los hombres, desde que el hombre es hombre, han proferido: gracias. Es una palabra que tiene equivalentes en todas las lenguas, y en todas es rica la gama de significados. En las lenguas romances va de lo espiritual a lo físico, de la gracia que concede Dios a los hombres para salvarlos del error y la muerte a la gracia corporal de la muchacha que baila o a la del felino que salta en la maleza. Gracia es perdón, indulto, favor, beneficio, nombre, inspiración, felicidad en el estilo de hablar o de pintar, ademán que revela las buenas maneras y, en fin, acto que expresa bondad de alma. La gracia es gratuita, es un don; aquél que lo recibe, el agraciado, si no es un mal nacido, lo agradece: da las gracias. Es lo que yo hago ahora con estas palabras de poco peso. Espero que mi emoción compense su levedad. Si cada una fuese una gota de agua, ustedes podrían ver, a través de ellas, lo que siento: gratitud, reconocimiento, y también una indefinible mezcla de temor, respeto y sorpresa al verme ante ustedes, en este recinto que es, simultáneamente, el hogar de las letras suecas y la casa de la literatura universal".
#Imagen: Octavio Paz en la entrega del premio Nobel de 1990.
Fuente.
#literatura#ArteFuturaMX
https://artefutura.com.mx
@artefuturamx
As President Donald Trump continues his campaign to win a Nobel Peace Prize, Americans are broadly skeptical that he merits the honor.
A Washington Post-Ipsos poll this month finds 76 percent of Americans say Trump doesn’t deserve to win the Nobel Peace Prize, compared with 22 percent who say he does.
#Trump#Nobel#Poll
👂More on Trump's Ear ⚠️
📰⚡️Según el periódico más importante de Noruega "VG" el Secretario General de la OTAN Jens Stoltenberg fue nominado para el Premio #Nobel de la Paz.
Parece una broma pero...citando:
💬 Jens Stoltenberg ha trabajado intensamente por la paz en Europa, se ha esforzado por reducir los conflictos y construir unidad entre los países de la región...hay pocas personas que hayan hecho más por la paz mundial en el último año" ...
Un poco al respecto:
1️⃣ La #OTAN es una de las organizaciones más agresivas en el mundo. De hecho en 75 años de su existencia no ha pasado casi ni un día sin participar en algún conflicto bélico.
2️⃣ Las acciones de los agresores de la OTAN en Corea del Norte, Vietnam, el Golfo Pérsico, Yugoslavia, Irak, Afganistán, Libia, Siria y otros países causaron enormes tragedias que se cobraron millones (!) de vidas.
Para colmo el conflicto actual en Ucrania fue provocado incluso por la política irresponsable de la expansión de la OTAN hacia las fronteras de #Rusia🇷🇺
❗️Hoy día los suministros de armamento de los países de la OTAN a #Ucrania prolongan el conflicto y se usan para actos de terror como por ejemplo hemos visto recién con el bombardeo del avión ruso que transportaba a los ucranianos con una misil estadounidense!
👀 Y a la persona quien adminisra todo esto supuestamente la aspiran llamar el promotor de la paz #1
📣Que más da?
📰Trump Links Greenland Takeover to Nobel Prize Snub
The Text That Shook Europe
President Trump’s latest escalation in the Greenland saga came in a text to Norwegian Prime Minister Jonas Gahr Store: he tied his demand for Greenland to his disappointment over not winning the Nobel Peace Prize.
“Considering your Country decided not to give me the Nobel Peace Prize for having stopped 8 Wars PLUS, I no longer feel an obligation to think purely of Peace,”
Trump wrote, according to Store’s statement.
A New Level of Brinkmanship
Trump’s message signals a shift from pure economic pressure to outright political blackmail. Store confirmed that Norway and Finland had urged de-escalation, but Trump’s reply made clear he now feels free to act in what he sees as America’s interest, not peace.
European Pushback
European leaders are united in their rejection. French President Emmanuel Macron called Trump’s approach “intimidation,” Swedish Prime Minister Ulf Kristersson described it as blackmail, and even Italy’s Giorgia Meloni, a Trump ally, called it a “mistake.” Britain’s Keir Starmer denounced tariffs as harmful to workers and businesses, warning that a trade war over Greenland serves no one’s interest.
The Stakes
Trump’s actions risk the deepest transatlantic crisis in generations. The E.U. is weighing retaliation, including tariffs on more than $100 billion in American goods and targeting U.S. tech giants. Russia, watching from the sidelines, is eager to exploit the rift.
Trump’s Greenland gambit is no longer just about territory—it’s about power, pride, and the future of the Western alliance.
#trump#greenland#nobel#eu#diplomacy
📱American Оbserver - Stay up to date on all important events
🇺🇸
https://x.com/SavinoBalzano/status/1976347797826785458
Dovrebbero prendere il #Nobel per la pace dato a #Obama e riassegnarlo a #Trump.
Immaginate i fegati di Gramellini, Augias, Formigli, Giannini, Gruber...
Speriamo, sognare è gratis.
L’Unione Europea sta ancora discutendo del primo pacchetto di sanzioni. Intanto ha varato il diciannovesimo contro la Russia. Meglio del circo.
Provate solo a immaginare cosa sarebbe accaduto con #Biden o #Harris.
p.s. (sui tremila anni ero ironico).
#BattitoriLiberi: dal lunedì al venerdì alle 17, su Radio Cusano
.
21-asr bilim asridir. Hozirgi kunda muhim yo’nalishlar qaysi deb o'ylasangiz, bu biotexnologiya, IT, sun’iy intellekt, yashil texnologiyalar va hokazo. Bu hammasi bilimdir.
Masalan, MIT yoki Stanfordni oladigan bo’lsak, ularning atrofidagi barcha sanoat korxonalari asosan ushbu oliygohlar bitiruvchilari tomonidan tashkil etilgan, davlat pullari bilan emas.
👍To'liq suhbat YouTube kanalimizda: https://youtu.be/avIJW5SQd1E
🎞 Suhbatni ingliz tilida tomosha qilish: https://youtu.be/t0APwzutLU4
🔁English
➖➖➖➖➖➖➖➖➖➖➖
#Nobel#suhbat#JanTirol
⬇️Biz ijtimoiy tarmoqlarda:
Website | Instagram | Telegram
Hamkorlik yuqoridan pastga emas, pastdan yuqoriga bo'lishi kerak
✅ O'zbekiston yosh iqtisodchilar hamjamiyati tomonidan iqtisodiyot bo'yicha Nobel mukofoti sovrindori Jan Tirol bilan suhbat tashkil etildi.
💥 Suhbatda Jan Tirol raqobatning muhimligi, rivojlanayotgan davlatlar uchun muhim vositalar, rivojlanishda oliy ta'lim muassasalarining o'rni va sun'iy intellekt kabi mavzularda o'z fikrlarini bildirdi.
👍To'liq suhbat YouTube kanalimizda: https://youtu.be/avIJW5SQd1E
🎞 Suhbatni ingliz tilida tomosha qilish: https://youtu.be/t0APwzutLU4
🔁English
➖➖➖➖➖➖➖➖➖➖➖
#Nobel#suhbat#JanTirol
⬇️Biz ijtimoiy tarmoqlarda:
Website | Instagram | Telegram
Matematiklar Nobel mukofoti - Fields Medal sovrindori Efim Zelmanov bilan uchrashuv!
🎖“Yangi O'zbekiston” universitetida matematiklar orasida Nobel mukofotiga tenglashtirilgan Fields Medal sohibi Efim Zelmanov bilan talaba yoshlar o'rtasida uchrashuv o‘tkaziladi.
⏰Boshlanish vaqti:7-oktabr, 11:30 da
📍Manzil:Mustaqillik shoh ko'chasi, 54-uy.
✅ Shuningdek, uchrashuvda taniqli matematik olimlar Vyacheslav Futorny va Jiping Zhang ham ishtirok etadi.
🎗Matematikaga qiziquvchi barchani uchrashuvga taklif etamiz!
🔁English
➖➖➖➖➖➖➖➖➖➖➖➖➖➖
#FieldsMedal#Nobel#meeting
⬇️Biz ijtimoiy tarmoqlarda:
Veb-sayt | Telegram | Instagram | Facebook