[Python-3000-checkins] r64624 - in python/branches/py3k/Lib/urllib: parse.py request.py

Guido van Rossum guido at python.org
Tue Jul 1 22:57:33 CEST 2008


On Tue, Jul 1, 2008 at 1:53 PM, Georg Brandl <g.brandl at gmx.net> wrote:

> Fred Drake schrieb:
>
>> On Jul 1, 2008, at 4:28 PM, Georg Brandl wrote:
>>
>>> While I'm opposed to sweeping stdlib refactorings, this is an
>>> exception because a) the urllib package was only recently created,
>>>
>>
>> I'm not objecting to a refactoring; that would work just fine for the  new
>> package.
>>
>>  b) the imports are from other urllib submodules and therefore
>>> should be easy to understand and c) it mirrors what was done
>>> in urllib2.py.
>>>
>>
>> What I am objecting to is the assertion that importing names directly
>>  into the global namespace for a module is in any way "cleaner".   That's a
>> style issue, and I don't think there's anything approximating  consensus on
>> the matter.
>>
>
> OK, cleaner is perhaps the wrong word, forgive me for badly expressing
> myself :) What I meant is what I tried to explain in point b) -- since
> the imported names all refer to urllib-specific things, they do not
> cause confusion if you come across them unadorned in the source.
>

For comparison, the Google style guide for Python code specifically forbids
this particular style, motivated by making it clearer where things come
from.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-3000-checkins/attachments/20080701/90338709/attachment.htm>


More information about the Python-3000-checkins mailing list