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

Резултати

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

Пребарај: #talkofthetown

当前筛选 #talkofthetown清除筛选
MND Singapore

@mndsingapore · Post #585 · 04.03.2024 г., 09:31

#TalkOfTheTown: Driving innovation and sustainability is Singapore’s first “car-free” town 🚘. The upcoming Tengah Town Centre will have roads running below ground level, freeing up space above ground for amenities. Without roads, residents will also be able to cycle and walk freely. This increased in convenience and connectivity decreases residents’ need for cars — lowering their carbon footprint. That’s a win-win situation for all. What other exciting things are happening in Singapore? Find out in the next part of the series.

MND Singapore

@mndsingapore · Post #649 · 06.08.2024 г., 04:02

#MNDTalkOfTheTown: Let’s plan the future of Singapore together with the Draft Master Plan 2025 (DMP 2025) 🗺️ All Singaporeans are welcomed to share their thoughts and ideas for the DMP 2025, co-creating Singapore’s land use plans for the next 10-15 years based on 4 key themes: ⭐️ Shaping a Happy Healthy City ⭐️ Enabling Sustainable Growth ⭐️ Strengthening Urban Resilience ⭐️ Stewarding Our Nature and Heritage More exciting updates will be coming your way. Stay tuned to #TalkofTheTown for updates!

MND Singapore

@mndsingapore · Post #644 · 26.07.2024 г., 10:03

#MNDTalkOfTheTown: HDB has adopted precast technology for improved productivity and quality 🏗️ With precast technology, building components can be manufactured off-site before being delivered and assembled on-site. The precast components include: - Household Shelters - Staircases - Walls - Refuse Chute - Air-Con Ledge Stay tuned for the next part of our series where we introduce Singapore’s land-use plans for the future. #TalkOfTheTown

MND Singapore

@mndsingapore · Post #639 · 03.07.2024 г., 09:04

#MNDTalkOfTheTown: Introducing the BudgetMealGoWhere platform, where you can find cheap and good meals in Singapore 😋 Here’s how you can find your favourite meals on a budget: - Enter a postal code on https://gowhere.gov.sg/budgetmeal/ to find your nearest coffeeshop - Look out for stalls with the Budget Meal sticker Keep a lookout for the next part of our series to find out how we’re improving productivity at construction sites. #TalkOfTheTown

MND Singapore

@mndsingapore · Post #565 · 20.02.2024 г., 09:31

#MNDTalkOfTheTown: Playgrounds have come a long way since the 1960s. Here are some fun facts about these fun spaces: 💪 Playgrounds today are designed to help develop children’s motor skills, like climbing and balancing. 🌈 They are also themed to encourage children to stretch their imaginations and play pretend. 👨‍👩‍👧‍👦 Many are intentionally placed near fitness corners to allow families to come together and bond. 📖 Some of the thematic playgrounds even reflect the history and heritage of the towns. Even more exciting developments are unfolding in your neighbourhoods. Stay tuned to #TalkofTheTown for updates!

MND Singapore

@mndsingapore · Post #560 · 13.02.2024 г., 09:30

#MNDTalkOfTheTown: In the second part of our series, we learn more about the developing🏗️ Jurong Lake District (JLD). JLD’s infrastructure is designed with sustainability in mind. Some of the green initiatives are: ☀️Solar panels on all suitable surfaces. 💨District Cooling System to cool down buildings and the streets more effectively. 🚘EV charging points placed throughout the district. Keep a lookout for the next part of the series as we talk about the evolution of our playgrounds. #TalkOfTheTown

MND Singapore

@mndsingapore · Post #555 · 06.02.2024 г., 09:31

#MNDTalkOfTheTown: Let’s explore how technology has transformed the management of our trees! 🌳 With the help of Light Detection and Ranging (LiDAR) technology and advanced modelling tools like the Tree Structural Model (TSM), we can now accurately assess which trees need our attention – keeping our parks and neighbourhoods a safer place for all. Stay tuned to this series for more about how tech and innovation has transformed the way we work, play and live! #TalkOfTheTown

SODA inside

@sodamakeup · Post #845 · 23.03.2023 г., 15:50

Атака титанов или атака финалов... Не будем вдаваться в подробности, но после выхода часового спешла ясно одно – надо сесть пересматривать прошлые сезоны и учиться добавлять такие же отметины на лице (no spoilers area) 💅 Давай по порядку: ➡️ Набери на тонкую (лучше скошенную) кисточку матовой бордово-красной помады – у нас это или 006 оттенок #talkofthetown, или 004 #checkmatte ➡️ Наметь контуры отметин под и над глазами (например, как у Имир). Это будет подложка для теней ➡️ Возьми коричневый карандаш (002 оттенок) и вот как раз им начинай добавлять цвет у основания, растушевывая вниз (или вверх, смотря где начало) пушистой кистью ➡️ Пройдись тёмно-красными тенями от основания до конца ➡️ Набери на очень тонкую кисть коричные тени и дорисуй контуры сверху основания отметины, чтобы добавить глубины ➡️ Если что-то пошло не так – подкорректируй края консилеров или тоном, набрав их на тонкую кисточку. Всё-таки это место «отрыва», оно должно быть чётким ➡️ Остатками продукта с этой кисти сделай несколько параллельных друг другу линий от середины каждой отметины, чтобы сделать их более похожими на остатки мышечных волокон (а ведь это они и есть!) Всё! А чтобы следовать инструкции было проще мы сделали видео-туториал – ищи его по ссылке 😉 #sodalovesanime

MND Singapore

@mndsingapore · Post #682 · 26.08.2024 г., 04:02

#MNDTalkOfTheTown: Let’s find out how Project ADORE has helped more dogs to find their forever homes ❤️ Under Project ADORE, led by NParks, HDB flat owners can adopt local mixed-breed dogs of up to 55 cm in height, with proper safeguards in place. The project has even been expanded to allow for the rehoming of retired sniffer dogs too! 🐶 #TalkOfTheTown#projectADORE

SODA inside

@sodamakeup · Post #389 · 15.10.2022 г., 12:40

Итак 👻 Перевоплотиться в Бастинду на Хэллоуин тебе помогут: 💚 Палетка теней Under the sea #exploretheocean 💚 Тени для век Unicorn squad #unicornluv 001 💚 Палетка теней Galaxy cake #sugarbabe 001 pink cake 💚 Сатиновая помада в стике #talkofthetown в оттенке 001 Mint tea 💚 Карандаш для глаз #eyeloveunicorns в оттенке 007 Forest Queen 💚 Подводка-маркер для глаз #makeitpop в оттенке 106 Rainforest #sodalovespopculture#sodainspiration

SODA inside

@sodamakeup · Post #1014 · 18.06.2023 г., 16:33

It’s a cruel summer… with you🩷 Мы уже подобрали продукты к первым пяти эрам Тейлор здесь и здесь, а сегодня разберем оставшиеся пять! Итак, эры Тейлор (SODA's Version) 🌸 Reputation 🐍 Are you ready for it? Дерзкая, мне-все-равно-что-вы-обо-мне-думаете эра! Продукты эры: сатиновая помада в стике #talkofthetown в темном оттенке 005 Sweet cherry 🍒, жидкие тени #eyeloveyou в смелом оттенке getaway car 002 Fairy glow и много-много сияния с глиттером #bizarreshine и лаком для ногтей #starryglow 006 Aurora ⭐ А завершить образ можно черными сережками-молниями #sugargem⚡ Lover 💕 Самая милая, счастливая и влюбленная эра Тей — и все мы мечтаем однажды в ней оказаться 😭 Цвета соответствуют: пастельные, яркие, сияющие ✨ Продукты эры: палетка с критическим содержанием шиммера Galaxy cake 002 Blue cake, розовый глиттер #bizarreshine, розовый штампик-сердечко #makeitpop и те самые духи-кошка с их сладким ароматом и блестками 🐾 Аксессуары тоже кричат о любви — серьги heart in fire pink и набор колец pink 💘 #sodalovespopculture#sodalovestaylorswift