[Python-3000] [Python-checkins] r53276 - peps/trunk/pep-3108.txt

Brett Cannon brett at python.org
Fri Jan 5 23:30:21 CET 2007


On 1/5/07, Jim Jewett <jimjjewett at gmail.com> wrote:
>
> > +PEP 8 specifies that modules "should have short, all-lowercase names"
> > +where "underscores can be used ... if it improves readability"
> > +[#pep-0008]_.  The use of underscores is discouraged in package names.
>
> ...
>
> > -BaseHTTPServer      basehttpserver
> > +BaseHTTPServer      base_http_server
> > -CGIHTTPServer       cgihttpserver
> > +CGIHTTPServer       cgi_http_server
>
> And so we circle round to (namespace) packages, because is a dot
> really any worse than an underscore?
>
>     http.server.base
>     http.server.cgi
>     http.server.simple
>
> I had thought Guido had said "no", as a matter of scope creep,


Basically.  Very shallow packaging is all he has ever said he would allow.

but
> this rename doesn't seem to be any more disruptive than
> base_http_server.


Depends on your perspective.  Granted the refactoring will be no different,
but if you view the hierarchy it just suddenly got deeper with your
packaging.

On the other hand, I'm used to
>
>     >>> from package.subpackage.module import Class1 as C1, func_abcde as
> myfunc
>
> If I correctly read a recent note on google standards, then there are
> people who can't rename on import, and might be stuck using several
> dots (or worse, writing the semi-generic "server.base") on every
> reference.


Well, people might need to change their standards for code that they have
automatically refactored for Py3K.  Plus I am not going to worry about any
one person or company's coding standards.  I am only worried about Python's
coding standard.

The renaming discussion can happen after any new packaging of modules is
agreed upon.  So don't worry too much just yet, Jim.  =)

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070105/382a9b5d/attachment.htm 


More information about the Python-3000 mailing list