@QuietWorld · Post #6726 · 17.10.2019 г., 13:01
It's often just enough to be with someone. I don't need to touch them. Not even talk. A feeling passes between you both. You're not alone. – Marilyn Monroe #solitude@quietworld🍃
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
Пребарај: #solitude
@QuietWorld · Post #6726 · 17.10.2019 г., 13:01
It's often just enough to be with someone. I don't need to touch them. Not even talk. A feeling passes between you both. You're not alone. – Marilyn Monroe #solitude@quietworld🍃
Hashtags
@QuietWorld · Post #6722 · 16.10.2019 г., 23:30
I have to be alone very often. I'd be quite happy if I spent from Saturday night until Monday morning alone in my apartment. That's how I refuel. – Audrey Hepburn #solitude@quietworld🍃
Hashtags
@QuietWorld · Post #6714 · 15.10.2019 г., 08:30
A man can be himself only so long as he is alone. – Arthur Schopenhauer #solitude @quietworld🍃
Hashtags
@QuietWorld · Post #6705 · 14.10.2019 г., 08:30
If you make friends with yourself you will never be alone. – Maxwell Maltz #solitude#quotes @quietworld🍃
@QuietWorld · Post #6701 · 13.10.2019 г., 23:30
Alone let him constantly meditate in solitude on that which is salutary for his soul, for he who meditates in solitude attains supreme bliss. – Guru Nanak #solitude#quotes @quietworld🍃
@QuietWorld · Post #6700 · 13.10.2019 г., 13:00
"There's a tremendous difference between alone and lonely. You could be lonely in a group of people. I like being alone. I like eating by myself. I go home at night and just watch a movie or hang out with my dog. I have to exert myself and really say, oh God, I've got to see my friends 'cause I'm too content being by myself." - Drew Barrymore - #quotes#solitude @quietworld🍃
@QuietWorld · Post #6673 · 09.10.2019 г., 12:00
We visit others as a matter of social obligation. How long has it been since we have visited ourselves? #solitude#quotes @quietworld🍃
@QuietWorld · Post #6670 · 09.10.2019 г., 00:00
Solitude is a good place to visit but a poor place to stay. —Josh Billings – #solitude#quotes @quietworld🍃
@QuietWorld · Post #6668 · 08.10.2019 г., 12:00
When we cannot bear to be alone, it means we do not properly value the only companion we will have from birth to death — ourselves. – Morris Adler – #solitude#quotes @quietworld🍃
@QuietWorld · Post #6662 · 08.10.2019 г., 05:00
There's one thing worse than being alone – wishing you were. #solitude#quotes @quietworld🍃
@QuietWorld · Post #6688 · 11.10.2019 г., 08:30
Men go abroad to wonder at the heights of mountains, at the huge waves of the sea, at the long courses of the rivers, at the vast compass of the ocean, at the circular motions of the stars; and they pass by themselves.., without wondering. – St. Augustine – #solitude#quotes#reflection @quietworld🍃
Hashtags
@QuietWorld · Post #6654 · 07.10.2019 г., 04:39
You have to start knowing yourself so well that you begin to know other people – a piece of us is in every person we can ever meet. —John D. MacDonald – #quotes#solitude#reflection @quietworld🍃
Hashtags