@sgmrt · Post #1882 · 08.02.2024 г., 01:39
[CCL] UPDATE: Due to a signal fault, please continue to add additional 10 minutes travel time between #Stadium and #PayaLebar. You may consider alternative means of transport. - 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
Пребарај: #stadium
@sgmrt · Post #1882 · 08.02.2024 г., 01:39
[CCL] UPDATE: Due to a signal fault, please continue to add additional 10 minutes travel time between #Stadium and #PayaLebar. You may consider alternative means of transport. - SMRT
Hashtags
@sgmrt · Post #1881 · 08.02.2024 г., 01:14
[CCL]: Update: Due to a signal fault, please continue to add additional 10 minutes travel time between #Stadium and #PayaLebar - SMRT
Hashtags
@sgmrt · Post #1880 · 08.02.2024 г., 00:49
[CCL]: Update: Due to a signal fault, please add additional 10 minutes travel time between #Stadium and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1879 · 08.02.2024 г., 00:05
[CCL]: Due to a signal fault, please add additional 10 minutes travel time between #Stadium and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1425 · 01.04.2022 г., 04:41
[CCL] CLEARED: Train services between #Stadium and #Bartley have resumed. Free regular bus & free bridging bus svcs have ended. - SMRT
@sgmrt · Post #1421 · 01.04.2022 г., 04:09
[CCL]: Shuttle train service is available between #Stadium and #Bartley Platform B. - SMRT
@sgmrt · Post #1832 · 29.09.2023 г., 11:40
[CCL] CLEARED: Train services between #DhobyGhaut /#MarinaBay and #Stadium have resumed. Free regular bus and bridging bus services have ended. - SMRT
Hashtags
@sgmrt · Post #1792 · 29.09.2023 г., 00:00
[CCL] UPDATE: Our engineers are still rectifying the fault. Please add 30 mins train travel time between #DhobyGhaut / #MarinaBay and #Stadium. - SMRT
Hashtags
@sgmrt · Post #1789 · 28.09.2023 г., 23:00
[CCL] UPDATE: Our engineers are still rectifying the fault. Please add 30 minutes travelling time between #DhobyGhaut / #MarinaBay and #Stadium. - SMRT
Hashtags
@sgmrt · Post #1786 · 28.09.2023 г., 22:10
[CCL] UPDATE: Our engineers are still rectifying the fault. Please add 30 minutes train travel time between #DhobyGhaut / #MarinaBay and #Stadium. - SMRT
Hashtags
@sgmrt · Post #1693 · 07.04.2023 г., 07:02
[CCL]: Pls add 40mins of train travel time between #DhobyGhaut/#MarinaBay and #Stadium. Our engineers are on site to conduct the recovery operations. Free regular bus and free bridging bus svcs are available. - SMRT
Hashtags
@sgmrt · Post #1785 · 28.09.2023 г., 21:54
[CCL] UPDATE: Passengers travelling on CCL between #DhobyGhaut/ #MarinaBay and #Stadium, are advised to transfer to EWL at #PayaLebar to continue the journey. - SMRT