Changes between Version 1 and Version 3 of Ticket #9536
- Timestamp:
- Aug 1, 2010, 11:58:59 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9536 – Description
v1 v3 1 The goal of this task is to remove Python 2.4 compatibility code, and to start using Python 2.5-only features. This includes:1 The goal of this task is to remove Python 2.4 compatibility code, and to start using Python 2.5-only features. See [http://docs.python.org/whatsnew/2.5.html what's new in Python 2.5]. This includes: 2 2 3 * Use context managers and the `with` statement 3 * Use context managers and the `with` statement for: database transactions, handling locks, handling files. 4 4 * Use `... if ... else ...` expressions instead of the more error-prone `... and ... or ...`. 5 * Use `try: except: finally:` instead of nested `try: finally:` and `try: except:`. 6 * Use `except Exception:` instead of `except:`. 5 7 * Remove our own implementations for functionality that was introduced in Python 2.5. 6 8 * Use generator expressions instead of list comprehensions where adequate. 9 * Use tuple arguments to `str.startswith()` and `str.endswith()`. 10 * Use relative imports for parent, sibling and child modules? 7 11 8 12 Please add new items to this list as they pop up.