I'm encouraging the use of try: except around here.  I think the 
distinction between 'routine' and 'non-routine' only makes sense if
exceptions are so terribly slower than the routine that using them for
routine use will have a terrible effect in slowness on your program.
It's like using:

string1 = string1 + newstring

inside a loop.

The reason you don't do this is not because there is something conceptually
wrong with this idea, but because it's horribly slow.  And if smarter pythons
recognise this, and emit fast code for it anyway, then that objection goes 
away, and then, well, it is a more straight forward way to code it.

So, if performance is not an issue, then I would recommend using try:
except: wherever it feels natural, and not let '20 years of knowing that
in java exceptions are horrible big and slow things to be used sparingly'
influence what feels natural.

Laura

_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to