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

Пребарај: #timscott

当前筛选 #timscott清除筛选
NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24469 · 09.05.2026 г., 00:56

【📜 政策監理|CLARITY 法案 5/14 參議院銀委會 markup 確認:Tim Scott 目標 5/21 前完成】 美國參議院銀行委員會 5/14 上午 10:30 對《數位資產市場 CLARITY 法案》進行逐條審議。委員會主席 Tim Scott 目標 5/21 陣亡將士紀念日休會前完成;繼白宮 5/6 公布 7/4 目標後,立法時程進一步具體化。Tillis-Alsobrooks 穩定幣收益妥協打開推進路徑。 #CLARITYAct#TimScott#穩定幣立法 📍閱讀全文: https://abmedia.io/clarity-act-senate-banking-may-14-markup-tim-scott-may-2026

Venture Village Wall 🦄

@venturevillagewall · Post #3836 · 10.01.2025 г., 07:00

Ethereum Fundamentals Outshine Solana's Growth Fidelity reports fundamental performance of Ethereum is more crucial long-term than Solana's speed and low costs. High developer activity, Total Value Locked (TVL), and stablecoin availability enhance Ethereum's appeal to investors. In contrast, Solana's revenue surge is linked to meme-coin trading, seen as a cyclical trend that will falter in a bear market. Read more: Fidelity on Ethereum vs Solana Additionally, the US Senate Banking Committee preliminarily approves Senator Cynthia Lummis as head of the digital assets subcommittee. This new structure is overseen by Tim Scott. Key members include crypto-friendly legislators Bill Hagerty and Bernie Moreno. Find out more: Senate Approval of Lummis #Ethereum#Solana#DeFi#Crypto#USSenate#DigitalAssets#Investment#Stablecoins#MemeCoins#TVL#Legislation#Blockchain#Finance#TradeFi#Cryptocurrency#Senator#CynthiaLummis#TimScott#BillHagerty#BernieMoreno#Fidelity

Crypto M - Crypto News

@CryptoM · Post #64593 · 09.04.2026 г., 09:45

🚀 U.S. Senate Faces Challenges Over Cryptocurrency Legislation A cryptocurrency bill led by U.S. Senate Banking Committee Chairman Tim Scott is facing bipartisan challenges due to a controversial clause concerning DeFi developer protections. According to ChainCatcher, the clause proposes exemptions for non-custodial software developers who do not control user funds, allowing them to avoid registration as money transmitters or compliance with anti-money laundering regulations. Law enforcement organizations, including the National Sheriffs' Association and the National District Attorneys Association, have expressed concerns to Congress, warning that the clause could weaken efforts to combat financial crime. Senate Judiciary Committee Chairman Chuck Grassley has also voiced similar concerns. The cryptocurrency industry views the clause as central to the bill, with DeFi Education Fund Executive Director Amanda Tuminelli stating that any changes to the text are unacceptable. Democratic Senators Catherine Cortez Masto and Mark Warner are advocating for modifications to the clause. If bipartisan consensus is not reached, the bill may proceed without Democratic support, potentially affecting the required bipartisan majority for a full Senate vote. #USSenate#Cryptocurrency#Legislation#DeFi#FinancialCrime#MoneyLaundering#Bipartisan#TimScott#LawEnforcement#SenateJudiciary#ChuckGrassley#DeFiDeveloperProtections#AntiMoneyLaundering