[Python-Dev] Convention on functions that shadow existing stdlib functions
Eli Bendersky
eliben at gmail.com
Wed Jul 27 15:35:24 CEST 2011
> > 1. In the documentation of test.support mention explicitly that it's code
> > for CPython's internal use only, and these APIs aren't guaranteed to be
> > stable.
>
> There is a top-level note at
> http://docs.python.org/dev/library/test.html, but it won't be visible
> by people who arrive at an anchor point.
>
> I think officially documenting test.support is a mistake. There is no
> guarantee that APIs are stable or will even continue to exist.
> Docstrings are sufficient for own our purposes.
>
Initially I was *for* documenting, but this thing with showing up in the
index is a compelling counter-point.
> 2. Some functions like unlink and rmtree are obviously redundant, and
shadow
> frequently used Python stdlib functions, so I would either kill them
> completely or at least rename them appropriately.
They are not redundant, since they provide slightly different semantics
> (for example, they silence errors that happen when the path doesn't
> exist).
>
Sure, but I'm still leery of two functions with the same name doing acting
slightly differently.
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110727/83af9a19/attachment.html>
More information about the Python-Dev
mailing list