I think it means that you may have a subdirectory named "string" in your actual directory where you store e.g. your string-related scripts, and you have a Python package named "string" _somewhere_else_, but in the module search path. The subdirectory of the actual directory will have priority bacause of its place, and will prevent you of importing the string package.
2011/6/1 Marilyn Davis <mari...@pythontrainer.com> > I don't really understand why __init__.py is necessary -- except that it > makes the packaging scheme work. > > The Python Manual by Guido van Rossum and Fred L. Drake says: > > ... this is done to prevent directories with a common name, such as > string, from unintentionally hiding valid modules that occur later on in > the module search path. > > An example would probably set me straight. Can anyone help with that? > > Marilyn Davis > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor