TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #mvb

当前筛选 #mvb清除筛选
BNB Chain

@BNBCHAIN · Post #3744 · 03.09.2024 г., 05:13

Attention BNBChain 2024 Hackathon winners! Your exclusive opportunity has arrived! It's time for your direct interview with the MVB team! 🏆 Don't miss out on your winner's benefit. Submit your application for #MVB Season 8 by September 18th and take your project to the next level! 🙌 Apply here: https://forms.monday.com/forms/01d6aa8dc1d71a2a576923866915f563?r=apse2&ref=bnbchain.ghost.io Details: https://bnbchain.org/en/blog/bnb-chains-most-valuable-builder-mvb-program-returns-with-season-8

Hashtags

Crypto M - Crypto News

@CryptoM · Post #64525 · 09.04.2026 г., 06:06

🚀 Crypto Sector Performance: MVB Leads Gains, Moltbook & OpenClaw Theme Declines The cryptocurrency market witnessed varied sector performances recently, with MVB emerging as the top rising sector, recording a 38.54% increase. According to NS3.AI, the Moltbook & OpenClaw Theme sector experienced the most significant decline, falling by 18.56%. Additionally, Trading Bots saw a notable rise of 30.41%, while Solana Token-2022 decreased by 8.27%. These fluctuations highlight the dynamic nature of the crypto market, with sectors experiencing both gains and losses. #Crypto#CryptocurrencyMarket#MVB#Moltbook#OpenClaw#TradingBots#Solana#OPN