Многие из тех кто активно работал с Python2 несколько удивлены, почему в Python3 удобная функция reload() переехала из builtin в imp а потом и в importlib?
Ну было же удобно! А теперь лишний импорт😖
Дело в том, что начиная с Python3.3 функция reload() переписана на Python вместо Cи.
Что это нам даёт?
🔸 Такой код проще поддерживать и развивать
🔸 Python код легче читать, изучать и понимать.
Сравните это ➡️ и это ➡️.
🔸 Как результат пункта 2, проще писать свои расширения импорта. Например, пользовательский импортёр с какой-либо хитрой логикой по аналогии с импортом из zip архивов.
А есть ли у этого решения недостатки? Да, они всегда есть.
🔹 Так как это не builtin функция, её следует импортнуть перед использованием
🔹 Скорость замедлилась примерно на 5%. Очевидно, что это совершенно не критично. К тому же от версии к версии логика импорта будет оптимизироваться и ускоряться.
В самом начале файла importlib/__init__.py мы видим такой импорт:
import _imp # Just the builtin component, NOT the full Python module
То есть часть функционала по прежнему написана на Си, но достаточно низкоуровневая.
#basic
🤑6th Season of The Open League is coming!
The next season of the Open League is already approaching, the essence of which is to stimulate ecosystem and community projects. This in turn leads to an increase in the rate of tokens, which have now been significantly lowered against the background of recent events. The 6th season of the Open League starts on September 12.
Аre you ready for the new season?
#TheOpenLeague#TOL#TON#Telegram
MyTonWallet x $HMSTR x $CATI
😺The Catizen listing has ended on CEX and DEX exchanges, but the project continues to develop even after the #airdrop phase. The project takes 1st place in the 6th season of The #TOL (The Open League) normie league, which means that even after giving away 🪙 $CATI, we need to continue making on-chain transactions in order to increase our chances of a final airdrop from TOL.
👌 Now #TheOpenLeague has gone on a two-week break, but after that we will continue to do daily check-ins, using MyTonWallet, in the Explore section.
On September 26, we will have another listing – #HamsterKombat🪙 ($HMSTR). We can also use the MTW wallet to receive coins:
🟨Select the "on-chain airdrop" option in the hamster app and use MyTonWallet. No KYC checks, only reliable decentralization. We kindly remind you that you can connect the wallet only until September 21, 08:00 UTC.
🗓 Tokens will be available on September 26, starting at 10:00 UTC, and for further convenience, you can use the built-in exchange inside #MyTonWallet.
The tournament from MyTonWallet and TON Poker has also recently ended with a prize pool of $1,000 and 5,000 💎 $MY. The results can be found here.
Channel | Chat | Download
🇺🇸#макро#США
👆Нераспроданные запасы новых односемейных домов на всех стадиях строительства — от ещё не начатых до завершённых — выросли на 9,3% в годовом исчислении до 492000 домов без учёта сезонных колебаний, что является самым высоким показателем с декабря 2007 года.
🔴 Нераспроданные запасы построенных новых домов выросли на 53% по сравнению с прошлым годом и составили 116000 домов, что является самым высоким показателем с июля 2009 года - в разгар жилищного кризиса, когда застройщики пытались выжить...
🔴 Продажи готовых домов упали на 25% по сравнению с предыдущим месяцем в октябре до 21000 домов.
Жду проблемы у застройщиков сейчас:
#LEN#DHI#TOL#MTH#PHM#CCS
🏆Get 6 cool SBTs from TOL participants!
TBook is an modular incentive layer backed by TON Foundation. Now you have a chance to get 6 cool Soul-Bound Tokens from 6 top-tier projects participants of the 💎 TON Open League! Engage with the projects in staking, borrowing, lending, and trading to earn SBTs and claim the 🙏TON Society airdrop. Don't forget to check your rating! 🚀
🤩Go get your SBTs now!
#SBT#NFT#TheOpenLeague#EVAA#DeDust#Tonstakers#bemo#STONfi#TOL#StormTrade