![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Should I use "if" or "try" (as a matter of speed)?
From: Aahz <aahz@pythoncraft.com>
Date: Sun Jul 10 2005 - 15:21:02 CEST
Roy, I know you actually know this stuff, but for the benefit of
In article <roy-044F62.15060709072005@reader2.panix.com>,
Except that few would write the second loop that way these days::
for key in whatever:
Using ``in`` saves a bytecode of method lookup on ``has_key()`` (which is
for key in whatever:
If whatever had ``(key, value)`` pairs, you'd do::
key_dict = {}
-- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ f u cn rd ths, u cn gt a gd jb n nx prgrmmng.Received on Thu Sep 29 16:51:49 2005 |