How to guard against bugs like this one?

Carl Banks pavlovevidence at gmail.com
Tue Feb 2 15:26:16 EST 2010


On Feb 2, 11:07 am, Jean-Michel Pichavant <jeanmic... at sequans.com>
wrote:
> Carl Banks wrote:
> > On Feb 2, 2:49 am, Jean-Michel Pichavant <jeanmic... at sequans.com>
> > wrote:
>
> >> Carl Banks wrote:
>
> >>> Name your modules "send_email.py" or "sort_email.py" or if it's a
> >>> library module of related functions, "email_handling.py".  Modules and
> >>> scripts do things (usually), they should be given action words as
> >>> names.
>
> >>> (**) Questionable though it be, if the Standard Library wants to use
> >>> an "innocuous" name, It can.
>
> >> That does not solve anything,
>
> > Of course it does, it solves the problem of having poorly-named
> > modules.  It also helps reduce possibility of name clashes.
>
> Actually don't you think it will increase the possibility ? There are
> much less possibilties of properly naming an object than badly naming it.

You've got to be kidding me, you're saying that a bad name like
email.py is less likely to clash than a more descriptive name like
send_email.py?

> So if everybody tend to properly name their object with their obvious
> version like you proposed, the set of possible names will decrease,
> increasing the clash ratio.

I did not propose obvious module names.  I said obvious names like
email.py are bad; more descriptive names like send_email.py are
better.


Carl Banks



More information about the Python-list mailing list