@sgmrt · Post #1691 · 07.04.2023 г., 06:31
[CCL]: If you are at #DhobyGhaut and heading towards #PayaLebar, you may take the NSL and EWL instead. Free regular bus and free bridging bus services are still available. - SMRT
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
Пребарај: #dhobyghaut
@sgmrt · Post #1691 · 07.04.2023 г., 06:31
[CCL]: If you are at #DhobyGhaut and heading towards #PayaLebar, you may take the NSL and EWL instead. Free regular bus and free bridging bus services are still available. - SMRT
Hashtags
@sgmrt · Post #1894 · 22.03.2024 г., 02:35
[CCL] UPDATE: Normal train service has resumed. Free regular bus service between #PayaLebar and #DhobyGhaut / #MarinaBay has ceased. - SMRT
Hashtags
@sgmrt · Post #1893 · 22.03.2024 г., 02:19
[CCL] UPDATE: Additional 20 mins train travel time from #PayaLebar to #DhobyGhaut / #MarinaBay, due to a train fault. Free regular bus service is available between #PayaLebar and #DhobyGhaut / #MarinaBay. - SMRT
Hashtags
@sgmrt · Post #1892 · 22.03.2024 г., 01:55
[CCL] UPDATE: Additional 30 mins train travel time from #PayaLebar to #DhobyGhaut / #MarinaBay, due to a train fault. Free regular bus service are available between #PayaLebar and #DhobyGhaut / #MarinaBay. - SMRT
Hashtags
@sgmrt · Post #1884 · 08.02.2024 г., 03:14
[CCL] UPDATE: Due to a signal fault, please add additional 20 minutes travel time between #DhobyGhaut, #MarinaBay and #PayaLebar. Free regular bus services are available between #DhobyGhaut, #MarinaBay and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1883 · 08.02.2024 г., 02:19
[CCL] UPDATE: Due to a signal fault, please add additional 15 minutes travel time between #DhobyGhaut, #MarinaBay and #PayaLebar. Free regular bus services are available between #DhobyGhaut, #MarinaBay and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1745 · 23.06.2023 г., 21:19
[CCL] UPDATE: Normal train services between #DhobyGhaut / #MarinaBay and #PayaLebar have resumed. - SMRT
Hashtags
@sgmrt · Post #1744 · 23.06.2023 г., 16:33
[CCL] UPDATE: Train services have ended between #DhobyGhaut / #MarinaBay and #PayaLebar. Free regular bus and bridging bus have ceased. - SMRT
Hashtags
@sgmrt · Post #1736 · 23.06.2023 г., 14:19
[CCL] : [Update] Additional 30mins train travel time between #DhobyGhaut / #MarinaBay and #PayaLebar due to a signal fault. Free regular bus services are available between #DhobyGhaut / #MarinaBay to #PayaLebar. Our engineers are still looking into the fault. - SMRT
Hashtags
@sgmrt · Post #1735 · 23.06.2023 г., 14:03
[CCL] : Additional 30mins train travel time between #DhobyGhaut / #MarinaBay and #PayaLebar due to a signal fault. Free regular bus services are available between #DhobyGhaut / #MarinaBay to #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1734 · 23.06.2023 г., 13:18
[CCL] CLEARED: Train services between #DhobyGhaut /#MarinaBay and #PayaLebar have resumed. Free regular bus & free bridging bus svcs have ceased. - SMRT
Hashtags
@sgmrt · Post #1732 · 23.06.2023 г., 13:03
[CCL] : Additional 30mins train travel time between #DhobyGhaut / #MarinaBay and #PayaLebar due to a signal fault. Free Regular Bus is available between #DhobyGhaut / #MarinaBay and #PayaLebar. - SMRT
Hashtags