need dict to maintain order

Aahz Maruch aahz at
Sat Jan 19 20:32:49 EST 2002

[BTW, Jason, a reminder to please include attributions for quotes.  I've
restored the missing one.]

In article <mailman.1011469230.30562.python-list at>,
Jason Orendorff <jason at> wrote:
>> try:
>>    os.mkdir(self.dirname)
>> except OSError:
>>    pass
>It's better to do
>  if not os.path.isdir(self.dirname):
>      os.mkdir(self.dirname)
>and not squelch the error, if one occurs.

I don't agree that it's unambiguously better.  I've seen a lot of
thoughtful arguments on both sides during my years on, and my
stock response these days is, "it depends".
                      --- Aahz  <*>  (Copyright 2002 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista   

"I support family values -- Addams family values"

More information about the Python-list mailing list