This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

3to2 is a project to convert cleaner 3.x code to 2.x.

3to2 started as a project idea to reuse the 2to3/lib2to3 codebase for converting 3.x code to 2.x. This creates a new package, 'refactor', which supports lib2to3 and (non-existent) lib3to2.

The following goals were targeted at the US PyCon 2009 sprint of Python Core:

The discussions at the sprint pointed to a handful of essential conversions to use as starting goals of 3to2:

How far back into 2.x should 3to2 go?

Conversions from 3.x to 2.4 and earlier have a lot more work to do than those of 3.x to 2.6 and later. :-) During the sprint, we approached tackling major conversion items (see short list above) for 3.x to 2.6, then 2.5, then 2.4, ...

During the Google Summer of Code 2009, Joe Amenta wrote a more-or-less complete lib3to2. It is hosted on bitbucket and has a PyPI page.


2026-02-14 16:06