Sori Schwimmer <[EMAIL PROTECTED]> wrote:
...
> 2) Rocco Morreti wrote:
> > What is so repugnant about the equivalent, currently
> valid way of writing it?
> Nothing "repugnant". We have in almost all procedural
> languages an "if-else" construct, and a "case" or
> "elif" as well.
Python has no
It doesn't seem like a very useful construct, because you won't know at
what point the code failed in the try block, so it could execute code
at the beginning of the block several times if the error was in the
middle. That could be weird.
So, it would probably only be useful for one line try block
Sori Schwimmer wrote:
> 0) Sorry, I don't know how to post a reply in the same
> thread.
Usually it is simply hitting the "Reply" button/link/key combination on
your mail/news reader when the post you want to reply to in view. (If
you want reply to multiple people, you can always reply to the or
0) Sorry, I don't know how to post a reply in the same
thread.
1) Grant Edwards wrote:
> The "i += 1" line is almost certainly wrong.
You're certainly write, as I acknowledged in a follow
up "suggestion for (re)try statement - correction'
2) Rocco Morreti wrote:
On 2005-10-27, Sori Schwimmer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I think that would be useful to have an improved
> version of the "try" statement, as follows:
>
> try(retrys=0,timeout=0):
> # things to try
> except:
> # what to do if failed
>
> and having the following semantic:
>
> for i in
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):
> # things to try
> except:
> # what to do if failed
>
> and having the following semantic:
>
> for i in range(retrys):
> try:
>
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):
> sleep(timeout)
At the very least, "timeout" is the wrong wording, "delay" would be more
appropriate. A timeout is usually associa
"i += 1" is wrong there. I had in my mind at first a
"while" statement.
Sorry...
Sorin
__
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I think that would be useful to have an improved
version of the "try" statement, as follows:
try(retrys=0,timeout=0):
# things to try
except:
# what to do if failed
and having the following semantic:
for i in range(retrys):
try:
# things to try
except:
if i < retrys:
i