Basic importing question

Hussein B hubaghdadi at gmail.com
Wed Aug 20 07:45:12 EDT 2008


On Aug 20, 6:39 am, Bruno Desthuilliers <bruno.
42.desthuilli... at websiteburo.invalid> wrote:
> Hussein B a écrit :
> (snip)
>
> > One more question:
> > If I have this structure:
> > orig/com/domain/project/Klass1.py
> >                         Klass2.py
> >                         __init__.py
>
> > Why com, domain, project should have __init__.py also?
>
> Yes, why should they ? Unless you want to mimic Java's package system so
> you do "import com.domain.project.stuff" - which is IMHO a pretty bad
> idea -, there's just no reason to turn all your filesystem into a python
> package.
>
> Python's philosophy here is that flat is better than nested.

Sorry I don't follow you :(
Module package is also nested.



More information about the Python-list mailing list