A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-February/116940.html below:

[Python-Dev] PEP 414 - Unicode Literals for Python 3

[Python-Dev] PEP 414 - Unicode Literals for Python 3Vinay Sajip vinay_sajip at yahoo.co.uk
Mon Feb 27 15:40:53 CET 2012
Barry Warsaw <barry <at> python.org> writes:

> As for the "working" part, I forget the details, but let's say you have a test
> suite in your package.  If you run `python setup.py test` in a Python 2 world,
> then `python3 setup.py test` may fail to build properly.  IIRC this was due to
> some confusion that 2to3 had.
> 

There are other things, too, which make 2to3 a good advisory tool rather than a
fully automated solution. 2to3 does a pretty good job of solving a difficult
problem, but there are some things it just won't be able to do. For example, it
assumes that certain method names belong to dictionaries and wraps their result
with a list() because 3.x produces iterators where 2.x produces lists. This has
caused problems in practice, e.g. with Django where IIRC calls to the values()
method of querysets were wrapped with list(), when it was wrong to do so.

Regards,

Vinay Sajip

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4