Edgewall Software

Changes between Version 1 and Version 3 of Ticket #9536


Ignore:
Timestamp:
Aug 1, 2010, 11:58:59 AM (11 years ago)
Author:
Remy Blank
Comment:

Copying items to the description, to get a nice overview. Keep 'em coming!

We should probably also start using except Exception: instead of except:.

What about using relative imports for parent, sibling and child modules (e.g. use from .api import ...)? I wouldn't want to use relative imports for cross-package imports though.

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:
     1The 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:
    22
    3  * Use context managers and the `with` statement
     3 * Use context managers and the `with` statement for: database transactions, handling locks, handling files.
    44 * 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:`.
    57 * Remove our own implementations for functionality that was introduced in Python 2.5.
    68 * 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?
    711
    812Please add new items to this list as they pop up.