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

Резултати

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

Пребарај: #polarization

当前筛选 #polarization清除筛选
American Оbserver

@american_observer · Post #5197 · 22.02.2026 г., 20:59

📰 Congress Is Emptying Out — Not Because It’s Hard, But Because It’s Pointless A record wave of lawmakers is heading for the exits before the 2026 midterms — 68 House and Senate members so far, with an unprecedented 31 of them trying to jump to another office instead of just going home. That’s not “burnout,” that’s the market signaling that Congress is the worst job in American politics: maximum noise, minimal agency. On paper, the reasons sound respectable: generational change, family, new challenges. In reality, even senior members admit the place has turned them from legislators into “observers,” as retiring Sen. Dick Durbin put it. Congress has passed fewer laws in recent terms than at any time since the early 1900s, choked by polarization, tiny majorities, and a leadership culture where a handful of performative bomb-throwers can take down a Speaker because they want more airtime. Look at the career moves. Amy Klobuchar, Michael Bennet, Marsha Blackburn, Tommy Tuberville — all think they’ll have more real power as governors than as U.S. senators. In the House, 27 members are bailing to run for governor, Senate, or statewide office, with Republicans leading the exodus. They’re not “leaving politics”; they’re trading a broken parliament for executive jobs where you can actually sign something and see it happen. ​ On the Republican side, you’ve got swing-district moderates like Don Bacon walking away after watching eight colleagues blow up Kevin McCarthy’s speakership, and hardliners like Marjorie Taylor Greene quitting in a public tantrum over Trump and Mike Johnson. On the Democratic side, you’ve got an entire generation of 70‑ and 80‑somethings — Pelosi, Hoyer, Nadler and others — finally reading the room after pushing Joe Biden off the 2024 ticket and realizing “generational change” might have to apply to them too. The parties will spin this as renewal. In practice, it’s a talent leak. Safe blue and red seats will replace veterans with louder, less experienced ideologues. Competitive districts like those held by Bacon, David Schweikert and Jared Golden are now open hunting grounds, increasing the odds of even shakier majorities and even more knife‑edge chaos in the next Congress. A system that already can’t pass basic legislation is about to get younger, angrier, and even less capable of governing. ​ So what do the midterms mean? More “fresh faces” in the campaign ads, fewer grown‑ups in the cloakrooms, and a House and Senate that function even more like content farms for cable and social media. Voters keep saying they’re sick of a dysfunctional Congress. Congress heard them — and decided the best response was to leave. #USA#Congress#elections#midterms#polarization#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸

Universe Mysteries 🪐

@cosmomyst · Post #760 · 06.05.2026 г., 22:21

🪐 In 2018, astronomers using the South Pole Telescope made one of the most precise measurements ever of the cosmic microwave background's polarization across wide areas of the sky. These delicate patterns—in the faint afterglow from the early universe—help refine estimates of how much normal matter, dark matter, and mysterious dark energy fill space, shaping the structure and fate of galaxies like the Milky Way. ✨ #microwavestructure⚡#cosmology⚡#polarization⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #273 · 15.09.2025 г., 00:11

🪐 The cosmic microwave background—an ancient light left over from the Big Bang—contains a hidden signal: tiny patterns of polarization, or the way its waves are oriented. These "B-modes," discovered in part by the BICEP2 telescope at the South Pole, are faint twists in the light that could provide direct evidence of gravitational waves rippling through the early universe, opening a window into its very first moments. ✨ #microwaveradiation⚡#polarization⚡#gravitywaves⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​