ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: slow try statements in python?
by Erik Max Francis other posts by this author
Feb 17 2003 10:20PM messages near this date
Re: slow try statements in python? | Re: Python any good?
Mark Higgins wrote:

>  I've seen quite a few examples of python code where try statements are
>  used to control the flow of a program... seems reasonable, but with my
>  background in C++ I'm always concerned that try statements are slow.
>  
>  Is this a concern in python?

No, since they're already de facto used for flow control in certain
circumstances.

Besides, even in C++, the idea is that the _throwing_ of an exception
might be expensive, but the defensive handling of one with a try...catch
clause should be very cheap.

-- 
 Erik Max Francis / max@[...].com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Scars are like memories.  We do not have them removed.
\__/ Chmeee
    ZOE / http://www.alcyone.com/pyos/zoe/
 A simple Python OpenGL rendering engine.
-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Mark Higgins
Greg Ewing (using news.cis.dfn.de)
Andrew MacIntyre
Erik Max Francis

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved