[Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

Georg Brandl g.brandl at gmx.net
Wed Nov 3 08:06:49 CET 2010


Am 03.11.2010 03:35, schrieb Antoine Pitrou:
> On Tue, 2 Nov 2010 19:57:48 -0700
> Brett Cannon <brett at python.org> wrote:
>> >
>> > How could we have split the module into a package in a way that matched the
>> > API, whilst still retaining backwards compatibility with the old API? We had
>> > no choice but to export the public names at the top level.
>> 
>> I'm not disagreeing with that. What I am saying is can now document
>> that it's unittest.case.TestCase instead of having that just be an
>> implementation detail.
> 
> -1.  unittest.TestCase is far simpler and more obvious that any
> javaesque qualified name.  urllib.request and friends are already
> annoying enough.

Agreed.  There are about 30 names importable from unittest, that is quite
manageable in a single namespace.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-Dev mailing list