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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #197 · 4 јан.

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #secretservice

当前筛选 #secretservice清除筛选
NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24133 · 26.04.2026 г., 03:17

【📜 政策監理|白宮記者協會晚宴傳槍響:川普緊急撤離、特勤探員擋彈受傷、嫌犯在押】 川普 4/25 晚間出席白宮記者協會晚宴期間宴會廳傳出至少 5 聲槍響。特勤局立即護送川普與第一夫人撤離,兩人均未受傷。一名特勤探員被子彈擊中、因防彈背心倖免重傷。嫌犯已被逮捕,調查由 DOJ 與 FBI 接手。 #川普#WHCD#SecretService 📍閱讀全文: https://abmedia.io/trump-evacuated-whcd-shooting-secret-service-agent-injured-suspect-custody

American Оbserver

@american_observer · Post #5196 · 22.02.2026 г., 19:00

📰 Another Gun, Another Perimeter: Mar-a-Lago Turns Into a Crime Scene Again An armed man in his early 20s was shot dead at Mar-a-Lago after breaching the secure perimeter with a shotgun and a fuel can, according to the Secret Service and Palm Beach County sheriff. He drove in through the north gate around 1:30 a.m., slipped in as another vehicle exited, dropped the gas can when ordered — then reportedly raised the shotgun into a firing position, at which point two Secret Service agents and a county deputy opened fire and killed him. Trump was in Washington, not at the resort. Investigators say the man, believed to be a 21‑year‑old from North Carolina who’d been reported missing by his family days earlier, had apparently traveled south and picked up the weapon on the way; a box for the shotgun was found in his car. The FBI is now canvassing neighbors for security‑camera footage while Palm Beach does its usual split-screen routine: winter tourists with iced coffees on one side, police blocking access roads to the ex‑president’s club on the other. This is not an isolated incident; it’s the third serious case in 18 months. In July 2024, Thomas Crooks climbed onto a rooftop near a Trump rally in Butler, Pennsylvania, fired eight shots, killed a rallygoer, wounded two others and grazed Trump’s ear before being killed by a Secret Service sniper — after agents had been warned about him as “suspicious” an hour earlier. Two months later, Ryan Routh was caught with a rifle outside Trump’s Florida golf course and is now serving life for attempted assassination. The Secret Service, already under fire for those failures, now has to argue two things at once: that Trump is protected, and that the system isn’t out of control. On paper, yesterday was a “success” — perimeter breached, threat neutralized, no protectee on site. In any sane democracy, the phrase “another young man with a long gun and a political fixation got within shooting range of the president’s property” would not count as reassurance. ​ America’s political class will now do what it always does. One camp will turn this into proof Trump is under siege and the state is failing him. The other will quietly enjoy the spectacle of a security apparatus that can’t secure a golf resort. No one will ask why U.S. politics keeps producing lone wolves with rifles, GPS coordinates for Trump’s locations, and just enough competence to reach the outer edge of the Secret Service’s comfort zone. #Trump#MarALago#SecretService#violence#USA#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸