How to guard against bugs like this one?
pavlovevidence at gmail.com
Tue Feb 2 19:45:07 CET 2010
On Feb 2, 2:49 am, Jean-Michel Pichavant <jeanmic... at sequans.com>
> 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.
> if the smtplib follows your advice, then
> you'll be shadowing its send_email module.
> The only way to avoid collision would be to name your module
I know, and as we all know accidental name clashes are the end of the
world and Mother Python should protect us feeble victims from any
remote possibility of ever having a name clash.
More information about the Python-list