Вторая по частоте 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
⚡️DAOLama NFT Lending: APY Increased to 3.64%
#TON#DAOLama
DAOLama NFT Lending announces an increased APY of 3.64% for their vault, offering higher yields for TON holders. With current liquidity being utilized efficiently, the deposit limit is set at 150,000 TON.
Source: link
@tonlines
DAOLama NFT Lending: Deposit Reopening in DAOLama Vault
#DAOLama#TON
DAOLama NFT Lending announces the reopening of deposits in the DAOLama Vault. With almost 100% utility reached, the channel invites users to take advantage of the new 150,000 TON limit and growing APY ahead of upcoming events.
Source: link
@tonlines
⚡️DAOLama NFT Lending: Buy TG Stars and Premium with TON
#TON#DAOLama
DAOLama NFT Lending has introduced the option to purchase TG Stars and TG Premium using TON directly within the DAOLama App. This update simplifies purchases, eliminating KYC requirements and supporting USDT in the next update.
Source: link
@tonlines
⚡️DAOLama: Final Days of Anonymous Telegram Numbers Contest
#Telegram#DAOLama
DAOLama announces that there are only three days left until the end of the Anonymous Telegram Numbers Contest. Participants are reminded of the special annual interest rate of 10% on loans available until the event concludes. Partners provide additional offers to boost points.
Source: link
@tonlines
DAOLama NFT Lending: Activate Your SBT Discounts
#DAOLama#SBT
The DAOLama NFT Lending channel announces the activation of discounts for SBT Tier-1, Tier-2, and Tier-3 tokens. Users can use the DAOLama App to claim their discounts and apply them to loans with Anonymous Numbers.
Source: link
@tonlines
DAOLama x CapsGame: Launch of 'Follow the Lama' Season
#DAOLama#CapsGame
The DAOLama NFT Lending (@daolama) channel announces its collaboration with CapsGame for the launch of the 'Follow the Lama' season. Players can now use DIAMOND chips as collateral to gain liquidity on the DAOLama App. The new season features exclusive tasks, a leaderboard, and rewards that include converting lama points into tickets for valuable in-game items.
Source: link
@tonlines
🦙DAOLama Team x TON Society Event!
This month is set to be special for all Telegram Anonymous Numbers holders 🐶
Together with TON Society and leading DeFi partners, the DAOLama team has prepared a massive event that will grant number holders exclusive opportunities and benefits within the TON ecosystem 🤟
🏆Prizes & Rewards
🥇Zero-fee liquidity
🥈50% discount on fees
🥉25% discount on fees
🐷SBT & Lifetime Bonuses
🏆Top-10 – 10% discount
💎 Top-50 – 7% discount
💎 All participants – 5% discount
🪙Upgraded Benefits:
🟢Enjoy a reduced 10% interest rate (only during the event).
🟢Extended loan period of up to 2 months.
How to participate?
✅ Prepare a wallet with your Telegram Anonymous Numbers NFT
✅Take a loan on DAOLama and use TON in DeFi projects
✅ Track your position on the Leaderboardand accumulate points
Bonus Points from Partners
🤝Tradoor – 0.25 points per TON provided
🤝Ston.fi – 0.25 points per TON provided
🤝Rainbow.ag – 0.25 points per TON exchanged
🗓️The contest is live – don’t miss your chance!
🦙Join DAOLama now!
#DAOLama#SBT#DeFi#TONSociety
🪅DaoLama launched vault in TON with APY 40% and announced the $LLAMA holder incentive program
❤️ A function has appeared to provide liquidity in the TON token, where 80% of the income from each issued loan is distributed among the owners of $DLP (contract address). APY's annualized return is currently ~40%. If you don't know what this means yet, we encourage you to read our post on the topic — What is the difference between APY and APR?
Recently, the team announced an incentive program for holders of the $LLAMA project token — regular repurchase of coins from the market directly through #DEX, which is very important, and sending these tokens to their holders.
↗️ As the project grows, the ransom amounts will increase, but the dates will be kept secret to avoid manipulation of the coin rate. So in the long run it sounds very tasty for #LLAMA.
And now the most interesting...
❤️ Each user who follows our referral link will receive a 100% discount, as well as 10% more $TON for the first loan or purchase on credit on the DaoLama marketplace.
#DaoLama#staking#TON
💛 Storm joins the 🦙 DAOLama contest!
We previously shared details about the DAOLama Team x TON Society event, which unlocked unique opportunities for holders of Telegram Anonymous Numbers
🐸Now, Storm Trade is joining the initiative — meaning you can now earn additional leaderboard points by using your TON-backed loans directly on the #Storm platform!
Here’s how it works:
⚫️ Use your Telegram Number NFTs as collateral to borrow TON
⚫️ Earn 1 point on the leaderboard for every 1 TON borrowed
⚫️ Trade on Storm Trade with margin in TON to gain +0.25 points for each TON used
⚫️ Climb the leaderboard and earn rewards and utilities from DAOLama
🤝Storm and DAOLama are teaming up to bring even more opportunities to participants — don’t miss your chance to get involved!
#DAOLama#SBT#DeFi#TONSociety#StormTrade