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

Резултати

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

Пребарај: #bostonceltics

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

@CryptoM · Post #65329 · 12.04.2026 г., 23:24

🚀 NBA Regular Season: Magic Lead Celtics at Halftime In the Polymarket prediction event for the NBA regular season game between the Orlando Magic and the Boston Celtics, a user with significant earnings of over $1.8 million has invested more than $370,000 on the Magic to win with a 10.5-point spread at an average opening price of 57.9¢. Additionally, the user placed $30,000 on the Magic to win with a 12.5-point spread at an average opening price of 52¢. According to Odaily, the game, which started at 6 a.m. UTC+8, is currently at halftime with the Magic leading 61-52. Today marks the final day of the NBA regular season, with the Magic holding a record of 45 wins and 36 losses, placing them 7th in the Eastern Conference. The Celtics, with a record of 55 wins and 26 losses, are ranked 2nd in the Eastern Conference. #NBA#OrlandoMagic#BostonCeltics#Polymarket#basketball#EasternConference#MagicLead#NBARegularSeason#sportsbetting#halftime