[Python-ideas] Implied try blocks
solipsis at pitrou.net
Sun Mar 25 17:19:05 CEST 2012
On Sun, 25 Mar 2012 10:15:05 -0400
Calvin Spealman <ironfroggy at gmail.com>
> What if we allowed this to be implied and except/else blocks bound to
> the previous
> statement? A try block would be an optional form, and mostly left for
> multi-block try's
> r = some_single_statement()
> except TypeError:
> print "oh no!"
> raise OhNoException()
> p = prepare(r)
> print "I got", p
Saving one line and four non-whitespace characters?
-1 from me.
More information about the Python-ideas