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

TGINSIGHT SIMILAR POSTS

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

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

Многие из тех кто активно работал с Python2 несколько удивлены, почему в Python3 удобная функция reload() переехала из builtin в imp а потом и в importlib? Ну было же удобно! А теперь лишний импорт😖 Дело в том, что начиная с Python3.3 функция reload() переписана на Python вместо Cи. Что это нам даёт? 🔸 Такой код проще поддерживать и развивать 🔸 Python код легче читать, изучать и понимать. Сравните это ➡️ и это ➡️. 🔸 Как результат пункта 2, проще писать свои расширения импорта. Например, пользовательский импортёр с какой-либо хитрой логикой по аналогии с импортом из zip архивов. А есть ли у этого решения недостатки? Да, они всегда есть. 🔹 Так как это не builtin функция, её следует импортнуть перед использованием 🔹 Скорость замедлилась примерно на 5%. Очевидно, что это совершенно не критично. К тому же от версии к версии логика импорта будет оптимизироваться и ускоряться. В самом начале файла importlib/__init__.py мы видим такой импорт: import _imp # Just the builtin component, NOT the full Python module То есть часть функционала по прежнему написана на Си, но достаточно низкоуровневая. #basic

Hashtags

Резултати

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

Пребарај: #donroedoctrine

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

@american_observer · Post #4976 · 27.01.2026 г., 19:39

Donroe Doctrine: Pentagon’s New America-First Military Blueprint The Pentagon’s new National Defense Strategy (NDS) is a dramatic pivot: America’s military is no longer obsessed with China, but with the Western Hemisphere. The document, released under President Trump, declares that defending the U.S. homeland and asserting dominance in the Americas is now the top priority, not the Indo-Pacific. The New Doctrine: Donroe, Not Monroe Forget the old Monroe Doctrine—this is the “Donroe Doctrine,” a slogan that captures the Trump administration’s vision: America first, America strong, America unchallenged in its own backyard. The Pentagon wants allies to shoulder more of the burden, especially in the Western Hemisphere, and is preparing to enforce its interests with military force if needed. Greenland, the Panama Canal, and the Gulf of Mexico are highlighted as strategic chokepoints. China: Downgraded, Not Ignored China is still on the list, but as a secondary concern. The Pentagon says it will deter Beijing “through strength, not confrontation,” and is pushing for more military-to-military talks, de-escalation, and “deconfliction”. The strategy notably omits Taiwan, a departure from previous versions, and avoids framing China as an existential threat. Instead, the goal is to “prevent anyone from dominating us or our allies”—a diplomatic way of saying, “We’re not scared, but we’re not starting a fight either”. Allies: Step Up or Get Left Behind The new NDS is blunt: U.S. allies must do more. South Korea is expected to take the lead in deterring North Korea, with only “critical but limited” U.S. support. NATO allies in Europe are told to “manage” the Russian threat themselves, while Israel is hailed as a “model ally” but warned that U.S. support will be “critical but limited” in the future. Strength, Not Humiliation The Pentagon insists it doesn’t want to “strangle or humiliate” China. But the message to everyone else is clear: America is back, and it’s not playing by the old rules. The document is full of business metaphors: “burden sharing,” “cost-effective defenses,” and “supercharging the defense industrial base.” It’s less about saving the world, more about making America’s military sustainable—and profitable. Is this a bold new era of American self-reliance, or just another round of strategic shell games, where allies are left holding the bag while the Pentagon rebrands its retreat as a “Donroe Doctrine”? #DonroeDoctrine#WesternHemisphere#AmericaFirst#Pentagon#ChinaDowngraded#AlliesOnNotice 📱American Оbserver - Stay up to date on all important events 🇺🇸