Marco Bizzarri a écrit :
Hi all.
I read the PEP8 and the "importing Python Modules" article. However,
I'm still a little confused on what should the general rules for
importing modules.
I'm showing what I used in my current project, and will accept your
advices on how I should change them.
The
On Sat, Aug 30, 2008 at 4:53 PM, Eric Wertman <[EMAIL PROTECTED]> wrote:
>> I read the PEP8 and the "importing Python Modules" article. However,
>> I'm still a little confused on what should the general rules for
>> importing modules.
>>
>> I'm showing what I used in my current project, and will ac
Hi bearophile
On Sat, Aug 30, 2008 at 4:04 PM, <[EMAIL PROTECTED]> wrote:
>
> from somemodule import somename
>
> is often acceptable IHMO, but there are some things to consider:
> - you and the person that reads your code have to remember where
> somename comes from. So you can do it for well
> I read the PEP8 and the "importing Python Modules" article. However,
> I'm still a little confused on what should the general rules for
> importing modules.
>
> I'm showing what I used in my current project, and will accept your
> advices on how I should change them.
> import module
>
> and then
Marco Bizzarri:
> I'm just confused because PEP8 seems to suggest that the from module
> import Class style is acceptable; is there a big "if you know what are
> doing" before, which I'm unable to see?
from somemodule import somename
is often acceptable IHMO, but there are some things to consider
On Sat, Aug 30, 2008 at 2:20 PM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
> 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.
>
>
>
Thanks Fredrik; I understand that is th
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.subpackge.module import MyClass
Is this an accepted way to write imports? According to what I
understood in arti
Hi all.
I read the PEP8 and the "importing Python Modules" article. However,
I'm still a little confused on what should the general rules for
importing modules.
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