diff options
author | David Coles <dcoles@gaikai.com> | 2011-04-08 17:47:05 -0700 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2011-05-04 15:00:21 +0200 |
commit | 294c9f455c3534d836b010dacd2e7aa62a7dde9d (patch) | |
tree | ef1ba507c91d0dc14942cbc553f2a9013517e532 /.gitignore | |
parent | e300ee4920bf4618f58618f3063b362f811154c1 (diff) |
Add support for building with Python 3
Python 3 introduces some language changes that cause issues when running
c_client.py. This also breaks compatibility with Python 2.5 since it does not
support the "as" statement in try/except blocks and does not have reduce() in
the functools package.
The main changes are:
* try/except blocks require `except ... as ...:` to resolve syntactical ambiguity
* map() and filter() return iterators rather than lists in Python 3
* reduce() is now in functools package (and not built-in in Python 3)
* Dictionaries don't have a has_key() method in Python 3
* None and int types can't be directly compared in Python 3
* print() is a statement in Python 3
See http://diveintopython3.org/porting-code-to-python-3-with-2to3.html and
PEP-3110 for details.
Verified on Python 2.6.5 and 3.1.3.
Signed-off-by: David Coles <dcoles@gaikai.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions