Многие из тех кто активно работал с 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
India GST collections hit ₹2.43T in Apr’26 vs ₹2.23T (ex-cess) last year, +8.7% YoY; net GST ₹2.11T, +7.3%. Import-linked GST up 25.8%. Despite tax cuts, higher taxable value signals consumption strength; FY27 Centre target ₹10.2T.
#Economy
Centre to maintain FY27 capex at ₹12.22 lakh crore (+~9% YoY) vs ₹2 lakh crore in FY15. Govt to exit non-strategic sectors to crowd in private investment; LPG imports at ~60% with ~90% via Hormuz flagged as risk. R&D spend at 0.6% of GDP under review. #Economy
🇮🇳🤝🇨🇳 India gives fast track nod for China FDI in seven sectors
“These are capital goods, electronic capital goods, electronic components, polysilicon and ingot wafer, advanced battery components, rare earth permanent magnets, and rare earth processing”
#Economy
https://t.co/w0FYHf2dWh
Invest India brings in $6.1 bn investments across 60 projects in FY26 and It is estimated that India will attract investment worth $90 billion this year.
#Economy
Reliance Industries just posted ₹95,754 crore in annual profit. That is over $10 billion. First Indian company in history to cross that line.
The $10 billion profit club globally has maybe 50 companies. India just put one in it. #Economy
According to April 2026 IMF data, India has slipped to the 6th largest economy, falling behind the UK ($4.26T) with a projected FY27 nominal GDP of $4.15 trillion.
The decline is not due to a reduction in real economic growth, but primarily caused by a weakening Indian Rupee against the US Dollar and a downward revision of nominal GDP following a base-year change in Feb 2026.
#Economy