On Tue, 2005-02-22 at 19:14, Andrew McNamara wrote: > >> if e.errno <> errno.EEXIST: > >> raise > > > >You have a lot more faith in the errno module than I do. Are you sure > >the same error codes work on all platforms where Python works? It's > >also not exactly readable (except for old Unix hacks). > > On the other hand, LBYL in this context can result in race conditions > and security vulnerabilities. "os.makedirs" is already a composite of > many system calls, so all bets are off anyway, but for simpler operations > that result in an atomic system call, this is important.
Agreed. -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com