Вторая по частоте 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
#FARM/USDT analysis :
#FARM is currently in an uptrend, exhibiting a series of higher highs (HHs) and higher lows (HLs). The price is presently consolidating above the 200-period exponential moving average (EMA), and a bounce is anticipated, which would support the continuation of its bullish momentum. For a long entry, it is advisable to wait for a breakout above the $53 level to confirm the upward movement.
TF : 1H
Entry : $53.00
Target : $66.00
SL : $47.50
⚠️ Осторожно: после этого AMA может внезапно потянуть в #stake, #lend и #farm.
@bemofinance + @evaaprotocol + @bidask = 🔥
Увидимся завтра в 08:00 UTC! 👀
⚡️Electra meets you
The first DEX to trade perp assets directly from your wallet with high leverage, deep liquidity and the lowest fees.
Warm up with Bulls'n'Bears Game — pump $BTC to 1 billion, rack up points, and bring in more frens-electrons.
⭐️ More points mean bigger rewards!
⚡️Join Electra now!⏺
#TON#DEX#trade#farm#BTC
🤑Blum has released update — now we have the opportunity to create a tribe!
⚫️Go to tribe
⚫️ Every 8 hours we press “Claim”
⚫️ If possible, we spend tickets, because there was information that after a while they will expire
Also recently added the function of connecting a wallet and unlimited invites
♾
🛖Join our tribe and farm points for
💵 10% faster, as usual, let's try to reach the top together!
#blum#tribe#ton#farm
😸Farm $CATI on🎰🎰🎰
Today, 2 new farming pools with impressive prize pools appeared on the STON.fi exchange:
💎CATI/TON: 10,000 STON ($43,000)
🪙CATI/USDT: 10,000 STON ($43,000)
🗓 Farming will last until October 4. There is no blocking of LP tokens.
How to get rewards?
1. Top up the liquidity pool and receive your LP tokens
2. Click Farm on your liquidity pool
You can find detailed instructions here or watch our video guide📹
Farming is the process of earning rewards for providing your cryptocurrency as liquidity to decentralized finance platforms #DeFi.
#catizen#farm#stonfi#DEX#CATI
Raffle-airdrop $THNG from Drop Hunter and a mini-review of the token
😀 Things Token plans to launch an RWA platform for buying and selling real assets. It is hosted on our 🪙#TON blockchain and is already available on DEX platforms. You can learn more about the project.
The conditions for the #Airdrop are below:
🟡Launch the bot.
🟡Subscribe to the channel.
🟡Invite 5 friends (old referrals count).
🟡Buy 1 ticket and wait for the results to be announced.
Two-tier token system:
➖$THNGP: A token with voting rights in the DAO, mined through mining and participation in the presale. Can be exchanged for 👁#THNG at a ratio of 1:10. The transfer of this token is limited to a single transaction (for example, if you need to change your wallet). It can only be freely sent and received through mining, voting, and exchange (conversion) smart contracts. Do not attempt to sell these tokens or transfer them to exchanges.
😀$THNG: A freely tradable token for trading, transferring and other purposes.
🟡Drop type - Raffle.
🟡Total volume - 28 million $THNG coins
🟡Total winners - 400 people.
🟡For each user – $65,000 THNG for 1 ticket (50,000 points = 1 ticket)
😀 At the moment, THNG 2.0 staking is available with an APR of ~ 160% from August 23 to September 24.
🔥Keep farming and participate in all activities of DropHunters
#farm#drop#TON#web3