Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: Re Interest check in some delicious syntactic sugar for "except:pass"
Daniel Fetchinson
3/3/2010 2:34:00 PM
> By way of motivation, I wrote that email after copying/pasting the
> following a few times around a project until I wrote it into def
> SilentlyDelete() and its cousin SilentlyRmdir()
>
> """ code involving somefile """
> try:
> ........os.remove(somefile)
> except:
> .......pass # The bloody search indexer has got the file and I
> can't delete it. Nothing to be done.
You just found the right solution: define a function for something
that you do repeatedly. No need to change the language.
Cheers,
Daniel
--
Psss, psss, put it down! -
http://www.cafepress.com...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Re Interest check in some delicious syntactic sugar for "except:pass"
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password