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

Резултати

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

Пребарај: #blockchains

当前筛选 #blockchains清除筛选
Telegram & TON NEWS

@all_telegram_ton_news · Post #22617 · 07.01.2026 г., 08:58

The Daily TON (Telegram) 🔥 EVM vs non-EVM ⚫️ Let's expand on the topic "#blockchains in 2026". If you have interacted with DeFi, you have probably heard the terms "EVM-compatible" or "non-EVM" blockchain. This is not just technical jargon, but a fundamental division that determines which applications can run on the network and who will develop them. ⚫️EVM (Ethereum Virtual Machine) is the Ethereum virtual machine that has become the standard in the crypto world. Blockchains like Polygon, BSC, and Avalanche are EVM-compatible. This means that any smart contract or dApp written for Ethereum can be ported to such networks with almost no changes. The main advantage is compatibility and a huge ecosystem: developers, tools, and users are already there. ⚫️Non-EVM blockchains are networks with their own unique architecture. Bitcoin stands apart without smart contracts. Solana, SUI, TON, and others have created their own virtual machines and programming languages. Their goal is not... View original post

Hashtags

djangoproject

@djangoproject · Post #499 · 14.11.2017 г., 16:33

https://pypi.python.org/pypi/hyperledger/0.1.5 #Python#client for #Hyperledger. This work is licensed under the Apache License, Version 2.0. Hyperledger Project is a new Collaborative Project at The Linux Foundation. The technical community is just getting started and will be adding code to the repository in the coming weeks. Check hyperledger.org for more information about joining the mailing lists and participating in the conversations. #Blockchains