Многие из тех кто активно работал с 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
🚀BIG ANNOUNCEMENT!
🚀
Bitcoin💸 just achieved a monumental milestone, breaking the 💵1 trillion market cap! 🎉📈 With the continuous surge in ATH🔝 (All-Time High) values every day, we can't help but capitalize on this golden opportunity.
📆 SAVE THE DATE: THIS SUNDAY
⌛️Time : 17:00 PM (GMT)
🚀 Pump Target: At least 700%
💰Duration: The pump is expected to last for days.
This isn't just a pump; it's a chance to ride the wave of success in the booming crypto market.
Turn on your notifications and join us on Sunday for an epic pump that could bring massive profits.
Let's make this one for the record books! 💸#BitcoinPump#CryptoSuccess
Got any Questions? @RobertMillercrypto
🔥 Mastercard, Citigroup, and JPMorgan Chase join forces to pilot shared ledger technology for Tokenized Assets settlement processes, with the goal of enhancing speed and security in cross-border transactions. This collaboration could transform the financial sector by enabling diverse asset types to settle on a unified platform.⭐️🌐
#Cryptoassets
#Cryptosuccess
#Blockchainrevolution
🎉SLEX Exchange HITS Top-50 on CoinPaprika! 🚀
💫SLEX Exchange made it into the Top-50 among over 300 cryptocurrency exchanges on CoinPaprika! This achievement highlights our dedication to providing top-notch trading services and robust security.
🤝Thank you to SLEX community for your trust and support. This achievement is as much yours as it is ours!❤️
🔗Check out our ranking: SLEX on CoinPaprika
🦾Come aboard SLEX - wheee crypto and commodity trading meet innovative features. Grow and profit with us! ☄️
#SLEX#Top50#CoinPaprika#CryptoSuccess
Website| Telegram | Reddit | Facebook | Instagram | Medium | Linkedin | Twitter
🚨Crypto Trading Guide for Beginners🚨
Ready to master crypto trading? Join Ekta Mourya from FXStreet as she breaks down how to stop gambling and start building wealth with a structured plan! 💥
Key Insights:
- Stop guessing, understand market cycles 📉
- Avoid 3 common mistakes beginners make ❌
- Use the Crypto Fear & Greed Index to your advantage 🤑
- Top-down analysis with simple tools like RSI & Moving Averages 📊
Start trading like a pro today.
Watch now! 👉https://www.youtube.com/watch?v=R8aAPHvHiKU
#CryptoTradingGuide#BitcoinForBeginners#FXStreet#CryptoSuccess#SmartMoneyConcepts
🚨Crypto Trading Guide for Beginners🚨
Ready to master crypto trading? Join Ekta Mourya from FXStreet as she breaks down how to stop gambling and start building wealth with a structured plan! 💥
Key Insights:
- Stop guessing, understand market cycles 📉
- Avoid 3 common mistakes beginners make ❌
- Use the Crypto Fear & Greed Index to your advantage 🤑
- Top-down analysis with simple tools like RSI & Moving Averages 📊
Start trading like a pro today.
Watch now! 👉https://www.youtube.com/watch?v=R8aAPHvHiKU
#CryptoTradingGuide#BitcoinForBeginners#FXStreet#CryptoSuccess#SmartMoneyConcepts