syntax question - if 1:print 'a';else:print 'b'

Gregory Piñero gregpinero at gmail.com
Thu Oct 27 12:31:30 EDT 2005


That's interesting, Simon. However, my goal really was to do:

try:something(1);except:pass
try:something(2);except:pass
try:something(3);except:pass
...
for about 20 lines.

I figured this would be more readable because if I reader sees 20 lines of
nearly identical text he'll understand that it's some kind of boilerplate
type code, where-as if he sees tabbed stuff he may think there's meaning in
the code which there isn't. (not sure if that makes sense). However since it
doesn't seem possible, I'll just give up on my readability preference for
this block of code and use tabs.

And I don't want to edit the function so it's not an option to put the try
in there.

-Greg





On 10/27/05, Simon Brunning <simon.brunning at gmail.com> wrote:
>
> On 27/10/05, Gregory Piñero <gregpinero at gmail.com> wrote:
> > So much for writing my whole program on one line :-(
>
> http://www.unixuser.org/~euske/pyone/
>
> But you didn't hear it from me, OK? ;-)
>
> --
> Cheers,
> Simon B,
> simon at brunningonline.net,
> http://www.brunningonline.net/simon/blog/
>



--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com <http://www.blendedtechnologies.com>)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051027/3abad2a5/attachment.html>


More information about the Python-list mailing list