Многие из тех кто активно работал с 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
🔥NEW RELEASE🔥
😁Dynamically Combining Inside & Outside Passing by Jason Rau😁
➡️Unlock a truly adaptive guard passing game with Jason Rau’s groundbreaking system that seamlessly blends tight inside pressure passing with loose outside movement.
➡️Learn how to fluidly switch between styles depending on your opponent’s reactions, making your passing game feel unpredictable, overwhelming, and unshakable.
$127😍$11.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#JasonRau#Passing#NoGi#ADCC
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Understanding The Reap By Jason Rau😁
➡️Unlock the power of one of Brazilian Jiu-Jitsu’s most misunderstood and effective positions with Understanding The Reap by Jason Rau.
➡️This incredibly comprehensive course takes you deep into the intricacies of the "reap" — a position that is often overlooked, yet crucial for mastering lower body submissions, sweeps, guard passes, and even back takes.
➡️Whether you’re a beginner or an advanced practitioner, Jason Rau’s detailed breakdown of the reap will give you the tools to control and submit your opponent, defend with confidence, and add an entirely new dimension to your BJJ game.
$99😍$9.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#JasonRau#BJJFanatics#NoGi#Leglocks
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Outside Ashi Reloaded by Jason Rau😁
➡️Take your leg lock game to the next level with Outside Ashi Reloaded, an innovative instructional series by Jason Rau — a black belt under Matt Serra and one of our best-selling instructors.
➡️Jason dives deep into the strategic interplay between these attacks, teaching you how to create relentless pressure and chain submissions so that when your opponent defends one, they inevitably expose themselves to the other.
$127😍$11.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#JasonRau#Leglocks#NoGi#OutsideAshi
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Dynamically Taking The Back (Turtle) by Jason Rau😁
➡️Unlock the Ultimate Back-Taking Blueprint from Turtle with Dynamically Taking the Back (Turtle) — the revolutionary course by elite BJJ black belt Jason Rao, designed to take your control, timing, and back-attack game to a whole new level.
➡️From gripping strategies and handfighting to dynamic movement and pressure mechanics, you’ll learn how to turn every turtle situation into a back take with confidence and precision.
$99😍$9.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#JasonRau#Turtle#NoGi#ADCC
💁♀️Buy
💁♀️