[Python-Dev] Convention on functions that shadow existing stdlib functions

R. David Murray rdmurray at bitdance.com
Sat Jul 30 04:26:28 CEST 2011


On 2011年7月29日 23:32:57 +0200, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On 2011年7月29日 11:51:18 -0400
> Barry Warsaw <barry at python.org> wrote:
> > On Jul 29, 2011, at 05:25 PM, Antoine Pitrou wrote:
> > 
> > >> test.support *is* part of the stdlib.
> > >
> > >We have lots of internal APIs which are not documented, though.
> > >And test.support *is* for internal use.
> > 
> > The solution then is to rename test.support to test._support to make it clear
> > it's an internal implementation detail. Then you can remove the entire
> > section from the stdlib docs and just document it in the code.
>> Ideally so. Practically, it's a lot of churn and additional pain
> merging 3.2 bugfixes into default. The lack of an underscore doesn't
> always mean the API is public, because it hasn't always worked like
> this (we have many private APIs without an underscore).

I'm not sure it makes merging more difficult. I haven't had any
problems with email test merges even though I moved (i.e. renamed)
the test directory.
--
R. David Murray http://www.bitdance.com


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /