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-April/064478.html below:

[Python-Dev] Dropping __init__.py requirement for subpackages

[Python-Dev] Dropping __init__.py requirement for subpackages [Python-Dev] Dropping __init__.py requirement for subpackagesNick Coghlan ncoghlan at gmail.com
Thu Apr 27 12:43:51 CEST 2006
Guido van Rossum wrote:
> So I have a very simple proposal: keep the __init__.py requirement for
> top-level pacakages, but drop it for subpackages. This should be a
> small change. I'm hesitant to propose *anything* new for Python 2.5,
> so I'm proposing it for 2.6; if Neal and Anthony think this would be
> okay to add to 2.5, they can do so.

I haven't scanned this whole thread yet, but my first thought was to just try 
to find a way to give a better error message if we find a candidate package 
directory, but there's no __init__.py file.

i.e. something like:

ImportError: __init__.py not found in directory '<whatever>/foo' for package 'foo'

I like the fact that __init__.py documents, right there in the file system 
directory listing, that the current directory is a Python package.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
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