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

Резултати

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

Пребарај: #securitybreach

当前筛选 #securitybreach清除筛选
Crypto M - Crypto News

@CryptoM · Post #65409 · 13.04.2026 г., 05:36

🚀 Polkadot Bridge Exploit Mints 1 Billion DOT Amid Geopolitical Concerns A recent midday cryptocurrency digest reported a significant security breach involving the Polkadot network. According to NS3.AI, the exploit resulted in the unauthorized minting of 1 billion DOT tokens, raising concerns about the network's security protocols. In addition to the Polkadot incident, the digest highlighted geopolitical tensions, specifically the potential implications of a U.S. blockade of the Strait of Hormuz. Such an action could escalate risks in the region, affecting global markets and investor sentiment. #Polkadot#Cryptocurrency#Blockchain#SecurityBreach#DOT#Geopolitics#InvestorSentiment#GlobalMarkets

Crypto M - Crypto News

@CryptoM · Post #65108 · 11.04.2026 г., 01:53

🚀 OpenAI Confirms Security Breach Did Not Affect Passwords or API Keys OpenAI has confirmed that a recent third-party security incident did not compromise passwords or OpenAI API keys. According to Jin10, the company assured users that their sensitive information remains secure despite the breach. OpenAI continues to monitor the situation closely to ensure the protection of its users' data. #OpenAI#SecurityBreach#Passwords#APIKeys#DataProtection#UserSecurity

Crypto M - Crypto News

@CryptoM · Post #65185 · 11.04.2026 г., 17:11

🚀 Solana's Drift Protocol Suffers $285 Million Loss in Security Breach Drift Protocol experienced a significant security breach on April 1, 2026, resulting in a loss of $285 million. According to NS3.AI, attackers managed to drain Solana's largest perpetual futures exchange within approximately 12 minutes. The exploit was facilitated by a governance setup that utilized a two-of-five multisig and a zero-delay path for privileged actions. The attackers spent six months cultivating trust with insiders, leading to two Security Council members pre-signing transactions with hidden authorizations. In response to the breach, the Solana Foundation launched STRIDE, a foundation-backed continuous security program, just days after the incident. #Solana#DriftProtocol#SecurityBreach#285MillionLoss#PerpetualFutures#NS3AI#MultisigExploit#GovernanceSetup#STRIDE#SolanaFoundation#CryptoSecurity#InsiderAttack#BlockchainSecurity#SOL

Crypto M - Crypto News

@CryptoM · Post #64536 · 09.04.2026 г., 06:43

🚀 Odin Fun Addresses Security Breach with Multiple Measures Odin Fun co-founder Bob Bodily announced that several initiatives are underway to address the recent security breach. According to Foresight News, the platform is being restored to its pre-attack state, and efforts are being made to retrieve large cryptocurrency withdrawals made after the incident. The company is collaborating with law enforcement and exchanges to track and freeze the attackers' funds and is preparing for legal action. Coordination is also ongoing with other Bitcoin protocols affected by third-party smart contract vulnerabilities. The vulnerability has been identified, fixed, verified, and redeployed. A comprehensive third-party smart contract audit is in progress. Odin Fun is maintaining continuous communication with the main community to reach the best solution and is discussing with users the optimal path for platform relaunch. Previously, on April 1, Odin Fun experienced an unusual large-scale sell-off, primarily involving a few meme coins like BURRITO and CRYPTOBURG. Subsequently, multiple users reported abnormal account balances and unauthorized withdrawals of BTC and tokens. #OdinFun#SecurityBreach#Cryptocurrency#SmartContracts#LawEnforcement#Bitcoin#CryptoSecurity#ForesightNews#PlatformRestoration#LegalAction#CommunityCommunication#ThirdPartyAudit#BTC#UnauthorizedWithdrawals#MemeCoins#BURRITO#CRYPTOBURG