[Xcb] [PATCH] Add support for building with Python 3
Julien Danjou
julien at danjou.info
Tue May 3 01:22:56 PDT 2011
On Sat, Apr 09 2011, David Coles wrote:
> 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.
I'd be OK to merge this, but it does not seems to apply. Could you
rebase it for me, David?
--
Julien Danjou
❱ http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20110503/d3019045/attachment.pgp>
More information about the Xcb
mailing list