开发者

Presence autoload in Python 3.x?

开发者 https://www.devze.com 2023-02-14 05:43 出处:网络
Similar feature as: function __autoload(UndefinedClass) { include \'l开发者_JS百科ibrary/\'.UndefinedClass.\'.php\';

Similar feature as:

function __autoload(UndefinedClass)
 {
  include 'l开发者_JS百科ibrary/'.UndefinedClass.'.php';
 }
?>

Python package = _init.py, BIOS=MBR, C++= STIL or templates, PHP5 = autoload, but python 3.x ?


No, there is no such feature, because you don't need it. If you want to not import a module until it's needed, then you just import it when it's needed. If you want to avoid circular imports, you do pretty much the same thing.

There, now this question has an answer. :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消