Многие из тех кто активно работал с 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
Andan muy salsas 🤔
🔴 Los legisladores de #MC pidieron que Rubén Rocha, Enrique Inzunza y Juan de Dios Gámez sean juzgados en México por presuntos vínculos con el CDS ☝🏻📄⚠️
https://revistaelpolitico.com/nacional/mc-pide-desafuero-y-juicio-politico-ruben-rocha/
📊#MC breakout the cup and handle pattern. Currently, it is retesting above it. MACD crossover is showing bullish momentum. 💎
A successful retest above the horizontal support would confirm the upward move, while a failed retest could lead to a downward movement.👀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
📊#MC pumped with a high volume after the breakout of the lower marked horizontal resistance, which will now act as support. RSI is in the overbought region and it is getting rejected from the horizontal resistance.
📉
💬A solid breakout of the horizontal resistance would be the bullish confirmation, while in case of rejection, it will bounce from the horizontal support.
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
📊#MC is moving in an ascending triangle. Currently, it is rejecting from the horizontal resistance. The Ichimoku cloud is acting as resistance. MACD crossover is showing bullish momentum. 👀
A solid breakout of the ascending triangle would be the bullish confirmation and in case of rejection, it will test the ascending trendline support.✅
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️