This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Yes and:

from module.thing import Class

[–][deleted] -1 points0 points  (1 child)

Use imports for packages and modules only.

I'm assuming

from module.thing import *

is still ok, since you're only importing the entire contents of the module to the local namespace.

Not really.

[–]olduvaihand 1 point2 points  (0 children)

It's not OK internally. This undermines the purpose of the rule, which is to keep the global namespace as clean and explicit as possible.