@Learn_English_from_Zero_to_Hero · Post #60680 · 31.03.2026 г., 18:01
#Expressions
Hashtags
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
Пребарај: #expressions
@Learn_English_from_Zero_to_Hero · Post #60680 · 31.03.2026 г., 18:01
#Expressions
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60602 · 26.01.2026 г., 16:56
#Expressions 💥Throw sb off 'course : 🔅if sb/sth is thrown off course, they are forced away from the direction they should be travelling in: ▪️ The plane was thrown off course. 2🔅to force sb to change the direction in which their ideas or actions are moving: ▪️ The government was thrown off course by economic problems.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60131 · 23.08.2025 г., 18:19
#Expressions 💥Fly the coop. ▪️ (idiomatic) Leave or escape. 💥Once she heard the teacher's voice, she flew the coop .
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60129 · 23.08.2025 г., 18:14
#Expressions 💥Doom and gloom (uncountable) ▪️Something considered indicative of feelings of pessimism and despair. ▪️Antonyms: rainbows and unicorns, sunshine and rainbows. ⚡️The economic forecast contained the usual doom and gloom. ⚡️His sister was all doom and gloom after she lost the part.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60128 · 23.08.2025 г., 18:12
#Expressions 💥No great shakes (uncountable) ▪️(idiomatic) Something unexceptional, not noteworthy or special. ▪️Synonyms: nothing to write home about ⚡️You're welcome to stay here, but this hut ain't no great shakes for such as you.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59967 · 30.07.2025 г., 19:01
#Expressions 💥raring to do something (BrE) ● very eager to do something ⚜The children were raring to get outdoors.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59966 · 30.07.2025 г., 19:01
#Expressions 💥on the brink ●(idiomatic) Very nearly; imminent; close. ⚜The old building seemed to be on the brink of collapse.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59965 · 30.07.2025 г., 19:01
#Expressions 🔘on the level ▪️(idiomatic) Honest(ly), sincere(ly), straightforward(ly), fair(ly). 🔸He looks like a used car salesman, but he's really on thelevel, so you can trust him.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59936 · 24.07.2025 г., 19:00
#Expressions 💥Finer things ●That which is considered of a high quality, expensive or tasteful. •Example: ⚡️I'm not materialistic, though I do enjoy the finer things in life.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59935 · 24.07.2025 г., 19:00
#Expressions 💥Lose sleep over something •to worry about something •Example: ⚡️I know she's angry with me, but I'm not losing any sleep over it.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59934 · 24.07.2025 г., 19:00
#Expressions 💥Take the plunge •to do something important or difficult, especially after thinking about it for a long time. ●Example: ⚡️We're finally going to take the plunge and buy a house.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59909 · 23.07.2025 г., 06:16
#Expressions 💥Lend itself to sth FORMAL •to be suitable for a particular purpose •Example: ⚡️The novel's complex, imaginative style does not lend itself to translation.
Hashtags