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

Резултати

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

Пребарај: #capital

当前筛选 #capital清除筛选
DWF Labs Broadcast

@DWFLabs · Post #244 · 09.03.2023 г., 00:00

We're excited to be able to support the mission of Tonstarter in bringing #builders, #community and #capital together to accelerate the growth of #TON ecosystem. Let's keep working towards building a future for TON together! ✨ Full announcement here. // About Tonstarter: ▫️Tonstarter is the first TON-native launchpad, enabling crypto projects to raise capital in a decentralized, safe, and user-friendly environment. Find out more here.

DWF Labs Broadcast

@DWFLabs · Post #251 · 15.03.2023 г., 00:00

Congratulations Tonstarter on closing a $1.5 million investment seed round! 🎉 We're proud to support your mission to unite #builders, #community, and #capital to accelerate the #growth of TON ecosystem ⚡ It's exciting to be building a bright future together 🫡 Full announcement here.

Venture Village Wall 🦄

@venturevillagewall · Post #4287 · 02.03.2025 г., 16:00

Trump Launches U.S. Crypto Reserve Initiative Former President Trump announces a U.S. Crypto Reserve to bolster the crypto industry, including assets like XRP, SOL, and ADA. The initiative aims to counteract previous administrations’ criticisms and position the U.S. as the global crypto capital. Investors react as $ADA surges 30% post-announcement. Read more here. #Crypto#ADA#XRP#SOL#Trump#US#DigitalAssets#Investment#Capital#Blockchain

Venture Village Wall 🦄

@venturevillagewall · Post #3493 · 19.12.2024 г., 13:58

Vibly Fundraising Highlights Vibly has successfully raised $734.92K in its latest funding round, which took place on December 19, 2024. For more information, visit their website: Vibly. #Vibly#Funding#Investment#Startup#Tech#Finance#Innovation#Business#FundingRound#Capital#Growth#Entrepreneurship#Market#Development#Strategy#VentureCapital #2024

Venture Village Wall 🦄

@venturevillagewall · Post #3397 · 18.12.2024 г., 12:10

Standard Wellness Secures $10M Funding Standard Wellness has successfully raised $10 million in funding as of December 17, 2024. The company is dedicated to enhancing quality of life by providing safe and easy access to cannabis. #Funding#Cannabis#Healthcare#QualityOfLife#Investment#StandardWellness#Capital#Access#Wellness#Health

ПретходнаСтраница 1 од 3Следна