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

Резултати

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

Пребарај: #bolivia

当前筛选 #bolivia清除筛选
Communia

@communia · Post #37152 · 05.10.2023 г., 17:44

#Bolivia. Lucha interna en el MAS acaba con la expulsión del Presidente Arce, el vice David Choquehuanca y 28 altos cargos más... y la re-entronización de Evo Morales https://www.perfil.com/noticias/internacional/el-mas-expulsa-al-presidente-luis-arce-y-propone-a-evo-morales-como-candidato-unico.phtml

Hashtags

Canal Huelga🚩

@huelga · Post #20635 · 13.01.2024 г., 10:44

#Bolivia Huelga de trabajadores de la maternidad de Percy Boland, Santa Cruz. https://www.reduno.com.bo/noticias/anuncian-paro-de-24-horas-con-movilizaciones-en-la-maternidad-por-hacinamiento-y-falta-de-items-202411291440

Hashtags

🇮🇱Bolivia ha caído, Israel se posiciona en Latinoamérica Tel Aviv y La Paz están restableciendo oficialmente relaciones diplomáticas completas, otra gran victoria para el bloque emergente de los Acuerdos de Isaac. Bolivia primero cortó lazos con Israel en 2009 y nuevamente en 2014. Una breve restauración se produjo en 2019 bajo el Gobierno interino de derecha de Jeanine Áñez, alineando a Bolivia nuevamente con Israel y EEUU. Pero en 2020, después de que el Movimiento al Socialismo (MAS) volviera al poder, las relaciones colapsaron una vez más. Tras los ataques del 7 de octubre, Bolivia cortó todos los lazos con Israel y más tarde se unió al caso de genocidio de la Corte Internacional de Justicia (CIJ) de Sudáfrica contra Israel en 2024. El mes pasado, el centrista Rodrigo Paz Pereira se convirtió en el nuevo presidente de Bolivia. Bajo su liderazgo, La Paz ahora está cambiando de rumbo y renovando relaciones diplomáticas completas con Israel. Y mientras el país se somete a Israel, el expresidente Luis Arce es puesto bajo arresto. Este es el mismo patrón que Latinoamérica ha visto repetidamente, un giro geopolítico hacia Washington y Tel Aviv seguido casi inmediatamente por enjuiciamientos contra el anterior liderazgo de izquierda. Este es el resultado de conflictos sin sentido entre aliados ideológicos en Bolivia y ahora difícilmente la derecha soltará tan fácil el poder nuevamente. En cuanto a Israel, esta es otra señal de que el marco de los Acuerdos de Isaac se está expandiendo. #bolivia ——— Únete a la lucha por la verdad en 📱Telegram 📱YouTube 📱X (Twitter)

Hashtags

POPULAR FRONT

@popularxfront · Post #6274 · 16.05.2026 г., 17:34

🇧🇴#Bolivia: Clashes broke out between miner unions, protest groups, and law enforcement in La Paz as demonstrators called for the resignation of President Rodrigo Paz amid the country’s worsening economic and fuel crisis. Protesters confronted police while attempting to enter Plaza Murillo, Bolivia’s central government square, throwing what appeared to be dynamite sticks during the clashes. Meanwhile, roadblocks and demonstrations have continued across several parts of the country, including in El Alto, with regional reports describing a deteriorating security situation as authorities attempt to restore circulation. (via @correodelsurcom on X & Reuters)

Hashtags

POPULAR FRONT

@popularxfront · Post #6062 · 27.04.2026 г., 07:44

🇧🇴#Bolivia: Footage shows the Mobile Police Unit for Rural Areas (UMOPAR) of the Bolivian Police seizing a shipment of drugs that was set to be transported by plane at the Villa Tunari airstrip in the Chapare province. A brief exchange of gunfire erupted between the police and the suspected drug traffickers, after which several bags of cocaine, weapons, and the aircraft itself were seized. (via @submundooriginal)

Hashtags

International Geographic

@internationalgeographic · Post #5704 · 23.05.2025 г., 12:54

Andes Mountains, #Bolivia The Uyuni salt marsh (Spanish: Salar de Uyuni) is a dried—up salt lake. Thanks to the development of tourism in the Uyuni salt marsh, local residents began to build hotels from salt blocks in which they can stay overnight. It is noteworthy that beds made of salt blocks keep warm very well, and it is very hot on them at night. Everything is built from salt — chairs, tables, beds, walls, floors.

Hashtags

Bolivia Mágica

@BoliviaMagica · Post #443 · 30.01.2019 г., 12:04

Bolivia, país suramericano que posee diferentes geografías y variados paisajes, muchas naciones y étnias; rico en historia, impresionante en cultura y tradiciones ancestrales. ¡Eso es magia! Bolivia corazón de Suramérica. #bolivia t.me/BoliviaMagica

Hashtags

RTDocumentary

@rtdocumentary · Post #688 · 01.05.2022 г., 14:00

#Bolivia#video May 1 is a Labor Day. The holiday is celebrated in Russia and many other countries, such as Bolivia, where even children have to work. So they’re torn between helping their parents and school. See their stories in the video, and the entire documentary film Undermined: Bolivia’s child workers. Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #665 · 27.04.2022 г., 14:13

#video#Bolivia Bolivia has unusual battles – women dressed in heavy, multi-layered skirts fight each other. They’re known as Cholitas, and they pride themselves on looking their best in the ring. Outside the ring, they’re regular women: wives, mothers, business owners and even schoolgirls. But fighting is another social empowerment of indigenous women. Watch our the video to learn why women take part in such fights. Watch more Bolivian Cholita fighting in the full film The Good, the Bad and the Loco. Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #558 · 28.03.2022 г., 15:00

#video#Bolivia Salar de Uyuni is the world’s largest salt flat. It covers 11,000 square kilometres. Locals call it ‘God’s Mirror’. When salt was in great demand, it was essential. But now the situation has changed. In the late 1980s, vast lithium reserves were found at the salt flat, some of the biggest in the world. Lithium sometimes referred to as ‘21st-century oil,’ is an essential raw material needed to manufacture batteries. But unfortunately, lithium extraction pollutes the atmosphere and seriously disrupts the ecosystem. Still, saleros continue their work even risking their health because salt has become their whole life — they earn their living extracting it, making art pieces of it and even building salt houses. You can watch the full documentary on @documentaryplanet Follow: https://t.me/rtdocumentary

ПретходнаСтраница 1 од 4Следна