[Python-Dev] [Python-checkins] cpython (2.7): Closes #14306: clarify expensiveness of try-except and update code snippet
Nick Coghlan
ncoghlan at gmail.com
Sun Mar 18 14:49:25 CET 2012
More information about the Python-Dev mailing list
Sun Mar 18 14:49:25 CET 2012
- Previous message: [Python-Dev] cpython (2.6): Added tag v2.6.8rc2 for changeset bd9e1a02e3e3
- Next message: [Python-Dev] [RELEASED] Second release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Mar 18, 2012 at 1:58 AM, georg.brandl <python-checkins at python.org> wrote: > +catching an exception is expensive. In versions of Python prior to 2.0 it was > +common to use this idiom:: Actually, given the "prior to 2.0" caveat, "mydict.has_key(key)" is right: the "key in mydict" version was only added in 2.2. This answer probably needs more improvements than just modernising the example that is already there. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] cpython (2.6): Added tag v2.6.8rc2 for changeset bd9e1a02e3e3
- Next message: [Python-Dev] [RELEASED] Second release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list