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

Пребарај: #hedging

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

@venturevillagewall · Post #3795 · 05.01.2025 г., 10:00

Gold and Bitcoin Gain Structural Significance JPMorgan analysts predict lasting inflation hedging strategies as gold and Bitcoin solidify their roles in investor portfolios. They deem 2024 pivotal for the crypto market with a projected influx of $78 billion. Notably, the share of gold investments among private investors is also on the rise. Read more: ForkLog #JPMorgan#Bitcoin#Gold#Crypto#Investing#Inflation#MarketTrends#Finance#WealthManagement#InvestmentStrategies #2024 #CapitalFlow#DigitalAssets#PortfolioManagement#Cryptocurrency#Hedging#FinancialInsights

Journey to Fluency

@fluencyinenglish · Post #7900 · 03.10.2025 г., 13:15

در IELTS Speaking، خصوصاً Part 3، نمره شما بر اساس مهارت زبانی (Fluency & Coherence, Lexical Resource, Grammatical Range & Accuracy, Pronunciation) داده می‌شود، نه میزان اطلاعات عمومی یا صحت factual. ✅ راهکارهای عملی 1. از تردید کردن نترسید و صادق باشید جملاتی مثل: “I’m not an expert in this field, but I think…” “I don’t know much about this, although it seems that…” به شما اجازه می‌دهد بدون توقف ادامه دهید. 2. استفاده از speculation یا حدس منطقی وقتی نمی‌دانید، می‌توانید با حدس منطقی نظر بدهید: “It might be because…” “Perhaps this will lead to…” 3. مثال شخصی یا تجربه روزمره بیاورید “From my own experience…” یا “In my city/school…” حتی اگر اطلاعات عمومی کم باشد، مثال شخصی به طولانی‌تر شدن پاسخ و انسجام کمک می‌کند. 4. تمرکز روی انسجام و روانی صحبت از ضمیرها و ربط‌دهنده‌ها (this, that, these, however, on the other hand) استفاده کنید تا جمله‌ها به هم وصل شوند. 5. استفاده از واژگان پیشرفته و ساختارهای گرامری متنوع به جای تکیه روی اطلاعات، از واژگان دقیق و اصطلاحات متداول آیلتس استفاده کنید: “plays a pivotal role” “poses a significant challenge” “from my perspective” 🔹 نمونه پاسخ با speculation Q: Do you think governments should invest more in renewable energy? > “I’m not fully aware of all the policies, but I think governments should invest more in renewable energy. It might help reduce pollution and create new jobs. For example, building more solar farms could provide electricity for many households. Although I don’t know all the details, it seems like a positive step for the future.” #IELTS#IELTSSpeaking#SpeakingTips#Hedging#Speculation#Fluency#Coherence#LexicalResource#Band8#آیلتس#Part3#EnglishSpeaking#LanguageTips#AdvancedEnglish#Pronunciation