[Python-Dev] Convention on functions that shadow existing stdlib functions
eliben at gmail.com
Wed Jul 27 15:58:53 CEST 2011
> > 2. Some functions like unlink and rmtree are obviously redundant, and
> > frequently used Python stdlib functions, so I would either kill them
> > completely or at least rename them appropriately.
> But they aren't redundant, since the test.support versions ignore
As I mentioned elsewhere, it's not good practice to have two functions with
the same name doing something slightly different, in different modules in
> Perhaps what we could do is move the documentation for test.support to
> the devguide, and then vet the test suite so that unlink and friends
> are always called as 'support.unlink', etc.
Moving the documentation to the devguide is a good compromise between not
documenting them at all and placing the documentation in a user-visible
What do you mean by vetting the test suite so that unlink is always taken
from test.support? I suppose some tests would specifically want the original
unlink's functionality. In fact, at least a few tests use os.unlink
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev