Python: `from x import *` not importing everything

前端 未结 3 841
独厮守ぢ
独厮守ぢ 2020-12-16 20:55

I know that import * is bad, but I sometimes use it for quick prototyping when I feel too lazy to type or remember the imports

I am trying the following

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 21:28

    If shaders is a submodule and it’s not included in __all__, from … import * won’t import it.

    And yes, it is a submodule.

提交回复
热议问题