Re: Advice on the style to use in imports

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fredrik Lundh

    Re: Advice on the style to use in imports

    Marco Bizzarri wrote:
    I'm showing what I used in my current project, and will accept your
    advices on how I should change them.
    >
    The style is consistently the following:
    >
    from package.subpack ge.module import MyClass
    >
    Is this an accepted way to write imports? According to what I
    understood in articles, I don't think so.
    importing objects instead of the module (namespace) they live in can
    cause all sorts of aliasing and dependency issues. avoid unless you
    know exactly what you're doing.

    </F>

Working...