开发者

what's the difference between two Python imports

Python has two ways to import something from a module:

from mymodule import ClassOne, ClassTwo, ClassThree

and

from mymodule import (ClassOne, ClassTwo, ClassThree)

I cannot find any note (probably开发者_如何学运维, I'm just not trying hard enough) on this in Python's documentation. I want to know the significant difference between these two ways of importing.


If you put the items to import between brackets, you can use more than one line for everything you want to import, without escaping newlines.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜