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

Резултати

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

Пребарај: #writer

当前筛选 #writer清除筛选

🗓🇿🇦November 20 marks the birthday of Nadine Gordimer (1923–2014), one of South Africa’s most influential English-language writers. 🏅 Recipient of the 1991 Nobel Prize in Literature. ✊ A committed member of the African National Congress and an active voice in the struggle against apartheid. ⚖️ In 1964, Gordimer helped prepare Nelson Mandela’s defense speech for the Rivonia Trial. 📖 While in prison, Mandela wrote: “I read all of Nadine Gordimer’s novels that were not banned.” ✍️ In 1987, she played a key role in establishing the Congress of South African Writers (COSAW), an important cultural platform during the final years of apartheid. 🌍 Her work remains a powerful testament to the pursuit of freedom, justice, and human dignity. 📸 Photo: Wikipedia #SouthAfrica#Literature#NobelPrize#Writer#HumanRights#History

iGaming Freelance Content Writers/Translators (Native Speakers) #remote#удаленно#iGaming#content#writer#tango We’re looking for iGaming Freelance Content Writers/Translators (Native Speakers). Our digital holding is expanding and we’re looking for native Filipino speaking translators & writers for iGaming projects. You’re a perfect fit if you have: • 1+ year of proven experience in iGaming translation or content writing • Solid understanding of iGaming terminology and cultural specifics of your region • Native fluency in #Filipino + strong English (for reading source materials) • Ability to start immediately and meet deadlines reliably What you’ll do: • Translate and localize website content (JSON format) from English • Adapt texts considering cultural/linguistic nuances • Proofread and edit content as needed We offer: • Fully remote freelance / part-time work • Competitive rates (based on skills and experience) • Interesting tasks and professional team support • No test task – we trust your portfolio Let’s connect! ⏺Apply: @IvanRecruiter ➖➖➖➖➖➖➖➖➖➖➖ 🪩 Откликнуться быстрее других ➖➖➖➖➖➖➖➖➖➖➖

Desi Memes Funny Jokes

@DESI_MEMES_Funny_Jokes · Post #5485 · 19.10.2024 г., 11:09

. . . . . #attitude#explore#tranding#reelsinstagram#viwe#relatable#exploreindia#relationshipquotes#reelkarofeelkaro#reelsolve#writer#lovereel#motivationlife#motivationalquotes#exploreing#explorepage#brokenheart#sayari#feelitreelit#reelslovers#exploreindonesia#exploreindia#100kfollowers#instagram#fashion#foryou#viralreels