[Python-Dev] Convention on functions that shadow existing stdlib functions (original) (raw)

Eli Bendersky eliben at gmail.com
Thu Jul 28 05:43:12 CEST 2011


On Thu, Jul 28, 2011 at 02:53, Steven D'Aprano <steve at pearwood.info> wrote:

Eli Bendersky wrote:

Sure, but I'm still leery of two functions with the same name doing acting slightly differently.

and then in a later post: 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 the code-base. artist.draw() and gunslinger.draw() do not necessarily need to do the same thing,

Of course, but why do you ignore the "slightly different". Had support.rmtree been something completely different from shutil.rmtree, I wouldn't have a problem with it. But it just calls rmtree and ignores some errors. This is the part I have the problem with.

Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20110728/7ca14730/attachment.html>



More information about the Python-Dev mailing list