need dict to maintain order

Aahz Maruch aahz at panix.com
Sun Jan 20 02:32:49 CET 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 python.org>,
Jason Orendorff <jason at jorendorff.com> wrote:
>rihad:
>>
>> 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 c.l.py, and my
stock response these days is, "it depends".
-- 
                      --- Aahz  <*>  (Copyright 2002 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

"I support family values -- Addams family values" --www.nancybuttons.com



More information about the Python-list mailing list