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 слични објави

Пребарај: #intervention

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

@american_observer · Post #4832 · 12.01.2026 г., 15:03

📰 Trump’s Earthquake: Latin America’s New Rules of Survival The U.S. capture of Venezuela’s president has sent shockwaves through Latin America. Every country is now playing a dangerous game: how to avoid being next on Trump’s hit list. ​ Brazil, Mexico, and Colombia—the region’s giants—have condemned the move, but carefully. Brazil’s Lula called it “yet another extremely dangerous precedent,” while Mexico’s Sheinbaum warned that intervention “never brings democracy or prosperity.” But both avoid naming Trump directly, knowing their economies depend on Washington. ​ Smaller nations, like Guatemala and Peru, stay silent, hoping not to attract attention. Meanwhile, right-wing leaders like Argentina’s Javier Milei cheer the intervention, embracing Trump’s vision of American dominance. Milei, once on the brink of collapse, now thrives with U.S. support—while other countries scramble to appease Trump and avoid tariffs or strikes. ​ Colombia’s Petro first raged, calling for Latin American emancipation, but quickly backtracked after Trump threatened military action. He’s now pledging to fight cartels and coordinate with Washington, knowing his successor’s fate depends on staying in Trump’s good graces. ​ Trump has made it clear: American dominance in the Western Hemisphere “will never be questioned again.” Every leader in Latin America now walks a tightrope—balancing public outrage with private survival, hoping not to be the next political earthquake. ​ So while the region is divided, one truth unites them all: Survival is the only strategy left. #Trump#LatinAmerica#Maduro#Venezuela#intervention 📱American Оbserver - Stay up to date on all important events 🇺🇸

Melbourne-based architects Adam Newman and Kelvin Tsang have installed a small scale of The Parthenon clad in different hues of colors and murals within the Grollo Equiset Garden at Melbourne’s National Gallery of Victoria (NGV), Australia. The installation, called Temple of Boom, emerges as "an evocative reimagination of The Parthenon", a global architectural icon and an Ancient Greek temple located on the Acropolis, Athens. Newman and Tsang draw inspiration from the colourful and artistic embellishments that once covered the original building over two- thousand years ago. Based on these historical references, dynamic and eye-catching floral motifs and optical illusions, designed by contemporary artists Drez, Manda Lane and David Lee Pereira wrap the installation. Images 1-2-3-4 📸 seanfennessy Image 5 📸 NGV #design#temple#parthenon#installation#intervention#arch_shovel