A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/065283.html below:

[Python-Dev] warnings about missing __init__.py in toplevel directories

[Python-Dev] warnings about missing __init__.py in toplevel directories [Python-Dev] warnings about missing __init__.py in toplevel directories"Martin v. Löwis" martin at v.loewis.de
Sat May 27 08:49:50 CEST 2006
Ronald Oussoren wrote:
> Some time ago a warning was introduced for directories on sys.path  
> that don't contain an __init__.py but have the same name as a package/ 
> module that is being imported.
> 
> Is it intentional that this triggers for toplevel imports? These  
> warnings are triggered in the build process for PyObjC, which is in  
> itself pretty harmless but very annoying.

They were very close to not being harmless earlier this year: Python
was almost changed to actually treat the directory as a package
even if it does not contain an __init__.py. In that case, the directory
itself would have been imported, not the thing inside. The warning
is (also) a hint that you should do some renaming - future versions
of Python might drop the need for __init__.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4