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

Резултати

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

Пребарај: #bribery

当前筛选 #bribery清除筛选
BadVolf

@badvolfnews · Post #960 · 27.09.2023 г., 17:56

🔍 Egyptian businessman arrested at NYC airport. Accused of bribing Sen. Bob Menendez. Pleaded not guilty to corruption charges. 💰💼 Meetings arranged between Menendez, wife, Egyptian officials. 🚨 FBI found cash, gold, luxury items at Menendez's home. Menendez denies wrongdoing, refuses to resign. 🤔 Influence over military sales to Egypt during alleged bribery scheme. Accused of pressuring officials and disrupting investigations. 🏦 Co-defendants scheduled for arraignment. Menendez hires Hunter Biden's attorney. Stay tuned for updates! 📰#Corruption#Politics#Bribery#Scandal https://www.foxnews.com/politics/egyptian-businessman-accused-bribing-bob-menendez-arrested-airport-freed-5m-bond Subscribe to @BadVolfNews

International News

@intnewsagency · Post #9401 · 28.04.2026 г., 09:40

Mayor of Ufa Ratmir Mavliev Arrested for Bribery and Land Fraud Ratmir Mavliev, mayor of Ufa since 2022, was detained along with his deputies on corruption charges. In 2025, he orchestrated the illegal transfer and resale of a 1,300 sq. m. plot of the "Raduga" sanatorium for 13 million rubles, demanding bribes for protection. Coming from a wealthy family with assets worth 4 billion rubles, Mavliev faces up to 15 years in prison. #Ufa#Corruption#Mavliev#Bribery#Bashkortostan The main news of Russia and the world ishere.

Venture Village Wall 🦄

@venturevillagewall · Post #3965 · 23.01.2025 г., 22:00

Crypto News Highlights: Funding and Regulations Bitcoin hits $105,000 amidst notable developments in the crypto sector. - Senator Cynthia Lummis announces a Strategic Bitcoin Reserve to hold BTC for 20+ years with no new taxes applied. - Vitalik Buterin warns of potential bribery linked to political tokens. Full insights here. - Rep. Bryan Steil appointed chair of the House subcommittee on crypto, focusing on fraud prevention and legislation. Read more on Axios here. - Swarm Network raises $3M led by Y2Z Ventures. - Radius secures $7M for rollup sequencer development, backed by Pantera Capital. - Drift Zone receives funding from 369 Capital, amount undisclosed. - Trump declares USA the "world capital of AI and crypto" at WEF. #Bitcoin#Crypto#VC#Ethereum#PoliticalTokens#MEV#Web3#Funding#Fintech#Blockchain#Bribery#Legislation#Fraud#Stablecoin#CynthiaLummis#VitalikButerin#Trump#Y2Z#PanteraCapital