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

Резултати

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

Пребарај: #booster

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

@CryptoM · Post #65412 · 13.04.2026 г., 06:01

🚀 Pieverse Booster Token Rewards Now Available for Claiming Binance Wallet announced on X that participants in the Pieverse Booster activities can now claim their PIEVERSE token rewards for phases 1, 2, 3, and 4. Users are encouraged to navigate to the 'Discover' section, select 'Booster,' and then proceed to 'My Total Rewards' to access their accumulated tokens. By clicking on the 'Batch Claim' option in the upper right corner, users can efficiently collect all their rewards in one go. This update marks the availability of token rewards for those who participated in the initial phases of the Pieverse Booster activities. The process is designed to streamline the claiming experience, allowing users to consolidate their rewards with ease. Participants who have engaged in these activities can now benefit from their involvement by accessing their earned tokens through the specified steps. This initiative is part of Binance's ongoing efforts to enhance user engagement and reward participation within its platform. #Pieverse#Booster#TokenRewards#BinanceWallet#PIEVERSE#ClaimRewards#UserEngagement#Cryptocurrency#Blockchain#Binance

Reuters: World

@reutersworldchannel · Post #149407 · 15.10.2021 г., 13:49

October 15, 2021: Bill Clinton, Steve Bannon, FDA Moderna booster, Texas abortion law, Immigration Top headlines on October 15, 2021: Bill Clinton in hospital, Steve Bannon, FDA Moderna booster, Texas abortion law, Biden's immigration plans 1. Ex-President Bill Clinton is recovering in hospital after being treated ‘for a non-COVID-19 infection.’ The 75-year-old was admitted on Tuesday evening. 2. A panel probing the U.S. Capitol assault will vote to hold Steve Bannon in contempt of Congress after the Trump advisor refused to comply with a subpoena. 3. U.S. FDA advisers voted in favor of booster shots of the Moderna vaccine for Americans aged 65+ and those at high risk of illness. A U.S. appeals court rulesd to keep a Texas abortion ban in effect. The law bars the procedure as early as six weeks into pregnancy. 5. U.S. President Joe Biden's administration will restart Trump’s ‘Remain in Mexico’ policy by mid-November. The program forces asylum seekers to wait in Mexico for U.S. court hearings #FDA #COVID19 #USBorder #Texas #abortion #SteveBannon #CapitolRiot #BillClinton #Clinton #Moderna #Vaccine #Booster #US #Mexico #Migrants #Biden #UnitedStates #Trump #News #Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖