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

Резултати

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

Пребарај: #detention

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

@american_observer · Post #5190 · 21.02.2026 г., 19:02

“Terror Against Noncitizens”: When Trump’s Deportation Machine Meets a Fed-Up Judge A federal judge in California just called Trump’s immigration policy what immigrant communities have been calling it for years: “terror.” U.S. District Judge Sunshine Sykes accused the administration of “terrorizing” migrants, “recklessly” violating the law, and even “extending its violence on its own citizens” by linking the crackdown to two fatal shootings in Minnesota. The core fight is over mandatory detention. Under previous administrations, undocumented people with no criminal record generally had a shot at a bond hearing while their cases crawled through immigration court. Trump’s team shut that door, cutting off hearings and forcing thousands to file individual habeas petitions in federal court just to get a judge to look at their detention. More than 20,000 such cases have been filed since he took office. Judges keep granting release — and then catching the government ignoring, delaying, or creatively “misunderstanding” their orders. Sykes had already ruled in November and December that Trump’s blanket detention policy violated federal law and extended her order nationwide. The administration kept denying hearings anyway. In her new decision, she ordered DHS to notify eligible detainees they may qualify for bond and to give them access to a phone and a lawyer within an hour. She also vacated an immigration court ruling the White House was using as cover to continue the policy. ​ She isn’t alone. A judge in Minnesota just held a Trump lawyer in contempt for failing to return IDs to a migrant who’d already been ordered released, and a New Jersey judge demanded the administration explain why it missed court‑ordered deadlines in a dozen bond cases since December. “Judicial orders should never be violated,” one wrote — a sentence that shouldn’t need to exist in a functioning separation of powers. The administration’s answer? Homeland Security insists the Supreme Court has repeatedly backed its view of mandatory detention and says ICE “adheres to all court decisions until it ultimately gets them shot down by the highest court in the land.” Translation: we follow lower‑court orders only long enough to get them overturned, and if we don’t, well, you can always file another lawsuit. So on paper this is about bond hearings and statutes. In practice, it’s about an executive branch testing how far it can push the courts, how much fear it can generate, and how many people it can keep locked up by default — until a judge finally uses the word everyone else has been avoiding. #immigration#Trump#courts#detention#ruleOfLaw#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸