Re: Advice on the style to use in imports
- From: Bruno Desthuilliers <bdesth.quelquechose@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 30 Aug 2008 19:16:18 +0200
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 style is consistently the following:
from package.subpackge.module import MyClass
Is this an accepted way to write imports?
Yes, BUT : it means that if package.subpackge.module.MyClass is rebound during program execution (ie: after you imported it), your own code won't see that change.
.
- Prev by Date: (www.sneakers-in-china.com) Wholesale Air Jordan 6 Fusion
- Next by Date: Re: Importing module with name given as a variable
- Previous by thread: Re: Advice on the style to use in imports
- Next by thread: Re: Segmentation Fault on CDLL reloading
- Index(es):