Suggestion for (re)try statement
Lasse Vågsæther Karlsen
lasse at vkarlsen.no
Fri Oct 28 04:37:33 EDT 2005
Sori Schwimmer wrote:
> Hi,
>
> I think that would be useful to have an improved
> version of the "try" statement, as follows:
>
> try(retrys=0,timeout=0):
<snip>
> sleep(timeout)
<snip>
At the very least, "timeout" is the wrong wording, "delay" would be more
appropriate. A timeout is usually associated with starting a task and
waiting for it to complete, and continuing if it fails to complete in a
given timeframe, typically also aborting the task at the same time (ie.
executing a database query, connecting to a server, waiting for an
event/lock, etc.).
--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:lasse at vkarlsen.no
PGP KeyID: 0x2A42A1C2
More information about the Python-list
mailing list