jrw...@gmail.com
unread,Jan 14, 2008, 2:50:32 PM1/14/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to billmill.org discussion
I'm relatively new to Python, but I was wondering if using the try/
except block to control normal program flow (i.e., it's being used in
place of a conditional) creates performance problems. Every iteration
is entering the try/except block, and the TypeError will always be
thrown for valid Roman numerals. Is this considered something to
avoid in Python programming? I know that it's widely considered a no-
no to control program flow this way in Java programming, but part of
the reason for this convention in Java is due to JVM implementations
handling exceptions far more slowly than if/else blocks. For all I
know, the Python interpreter could be implemented much differently.
Is this the case with Python as well, or are try/except blocks in
Python commonly used to control program flow and not just handle
"exceptional" circumstances?