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

Резултати

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

Пребарај: #davidsacks

当前筛选 #davidsacks清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4292 · 03.03.2025 г., 04:00

Sacks Sells Crypto Holdings Amid Review David Sacks, White House AI and crypto czar, sold all his Bitcoin, Solana, and Ethereum holdings post-Trump's inauguration. This move precedes a government ethics review with plans for a full holdings update. More details: FT. #AI#Crypto#VC#Bitcoin#Ethereum#Solana#DavidSacks#CraftVentures#TrumpAdministration

Crypto M - Crypto News

@CryptoM · Post #64750 · 09.04.2026 г., 18:16

🚀 David Sacks Calls for Congressional Action on CLARITY Act David Sacks has called on Congress to pass the CLARITY Act, emphasizing that it would establish clear regulations for all crypto assets. According to NS3.AI, Sacks highlighted that last year's stablecoin regulation bill positioned the U.S. as a leader in the stablecoin industry. He also predicted that U.S. President Donald Trump will sign the bill into law. #DavidSacks#CLARITYAct#Congress#CryptoRegulation#Stablecoins#USPolitics#Cryptocurrency

Crypto M - Crypto News

@CryptoM · Post #65252 · 12.04.2026 г., 10:15

🚀 CLARITY Act Urged for Swift Advancement in Crypto Regulation Cynthia Lummis emphasized the urgency of advancing the CLARITY Act, warning that delays could push the next opportunity for establishing a crypto regulatory framework to 2030. According to NS3.AI, notable figures such as David Sacks, Brian Armstrong, and SEC Chairman Paul Atkins have also expressed support for expediting market structure legislation. #CLARITYAct#CryptoRegulation#CynthiaLummis#NS3AI#DavidSacks#BrianArmstrong#PaulAtkins#SEC#MarketStructure#Legislation

Venture Village Wall 🦄

@venturevillagewall · Post #4288 · 02.03.2025 г., 19:00

Trump's Crypto Reserve Announcement Shakes Market President Trump recently revealed plans for a U.S. Crypto Strategic Reserve, leading to a significant surge in Bitcoin value, which rose 10% to $94,000. The reserve will include Bitcoin, XRP, Solana, and Cardano, positioning the U.S. as a potential leader in the crypto space. Following this announcement, nearly $500 million in shorts were liquidated within four hours. The announcement reflects Trump's commitment to strengthen the crypto industry after previous governmental opposition. More updates are expected at the upcoming crypto summit in the White House on March 7. #Crypto#Bitcoin#XRP#Solana#Cardano#TRUMP#U.S. #CryptoReserve#MarketUpdate#ShortsLiquidation#WhiteHouse#Summit#Finance#Investment#Assets#Blockchain#DavidSacks#Economy#DigitalAssets#Trading

Venture Village Wall 🦄

@venturevillagewall · Post #4069 · 04.02.2025 г., 22:00

US Forms Joint Group for Crypto Rules David Sacks announced a joint working group of the U.S. House and Senate, focusing on advancing cryptocurrency legislation, starting with stablecoins. Additionally, a feasibility study for a U.S. Bitcoin reserve is underway. Read more. Senator Bill Hagerty has introduced legislation for a regulatory framework for stablecoins. Details here. #US#Crypto#Stablecoins#Bitcoin#Legislation#Securities#DeFi#Blockchain#Finance#DavidSacks#Senate#House#BitcoinsReserve#BAMM#FraxFinance#Hagerty#SEC#CryptoTaskForce#Regulation