@zince_general_collection · Post #9442 · 19.04.2026 г., 10:42
しろい: #illustration 260417 https://twitter.com/shiloroshi/status/2045253467577434506
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
Пребарај: #illustration
@zince_general_collection · Post #9442 · 19.04.2026 г., 10:42
しろい: #illustration 260417 https://twitter.com/shiloroshi/status/2045253467577434506
Hashtags
@besteanimebilder · Post #6334 · 04.04.2020 г., 17:01
ひこうき雲 #illustration 4096x1690
Hashtags
@besteanimebilder · Post #6271 · 26.02.2020 г., 20:11
shiro #illustration 10025x5457
Hashtags
@lovehopecollector · Post #1996 · 15.11.2023 г., 09:36
#Illustration Giacomo Bagnara
Hashtags
@lovehopecollector · Post #1784 · 08.10.2023 г., 19:33
#Illustration Form play Animation Studio Love the simplicity and creativity. Source
Hashtags
@lovehopecollector · Post #1632 · 18.09.2023 г., 08:00
#Illustration 余华潦草小狗 Eleven11dream source
Hashtags
@lovehopecollector · Post #1301 · 27.07.2023 г., 17:00
#Illustration Poster for documentary of Sinead O'Connor - Nothing Compares Akiko Stehrenberger “This and many iterations of it, made it to multiple rounds before it was finally unused in the end. However, I'm always happy when I get to step away from the computer. Painted with sumi ink, I then photographed water droplets over the painting. The tears concept references two things: her iconic music video and her many struggles in life that made her such a controversial figure.” RIP🌹🌹🌹
Hashtags
@lovehopecollector · Post #1646 · 21.09.2023 г., 15:15
#Art #Illustration Alex Gamsu Jenkins 好多古怪有趣充满想象力作品… 他还画漫画…好多屎尿屁…好好笑😀 Instagram: alexgamsujenkins
Hashtags
@lovehopecollector · Post #1571 · 06.09.2023 г., 15:19
#Art #Illustration Yoyo Nasty
Hashtags
@lovehopecollector · Post #1175 · 16.07.2023 г., 23:30
#Art #Illustration Guy Billout
Hashtags
@besteanimebilder · Post #6636 · 16.02.2021 г., 10:25
nagame #original#illustration 4724x3024
Hashtags
@besteanimebilder · Post #6612 · 26.11.2020 г., 18:55
きみとつなぐ #original#illustration 1080x1920
Hashtags