"also" to balance "else" ?
nid_oizo at yahoo.com_remove_the_
Thu Jun 16 00:06:22 CEST 2005
Ron Adam wrote:
> It occurred to me (a few weeks ago while trying to find the best way to
> form a if-elif-else block, that on a very general level, an 'also'
> statement might be useful. So I was wondering what others would think
> of it.
But the feature is already there:
for x in <iterable>:
If find "else" fine, since the only times I used it is in searches:
for x in <iterable>
if <gotcha-condition>: break
raise Exception('Not found')
In that case, 'else' sounds like the good keyword.
More information about the Python-list