|
6 | 6 | 2. It allows you to use a single, clean Python 3.x-compatible codebase to |
7 | 7 | support both Python 3 and Python 2 with minimal overhead. |
8 | 8 |
|
9 | | -Notable projects that use ``future`` for Python 2/3 compatibility are `Mezzanine <http://mezzanine.jupo.org/>`_ and `xlwt-future <https://pypi.python.org/pypi/xlwt-future>`_. |
| 9 | +Notable projects that use ``future`` for Python 2/3 compatibility are |
| 10 | +`Mezzanine <http://mezzanine.jupo.org/>`_ and `ObsPy <http://obspy.org>`_. |
10 | 11 |
|
11 | 12 | It is designed to be used as follows:: |
12 | 13 |
|
13 | 14 | from __future__ import (absolute_import, division, |
14 | 15 | print_function, unicode_literals) |
15 | | - from future.builtins import (bytes, dict, int, range, str, |
16 | | - ascii, chr, hex, input, next, |
17 | | - oct, open, pow, round, super, |
18 | | - filter, map, zip) |
| 16 | + from future.builtins import ( |
| 17 | + bytes, dict, int, list, object, range, str, |
| 18 | + ascii, chr, hex, input, next, oct, open, |
| 19 | + pow, round, super, |
| 20 | + filter, map, zip) |
19 | 21 |
|
20 | 22 | followed by predominantly standard, idiomatic Python 3 code that then runs |
21 | 23 | similarly on Python 2.6/2.7 and Python 3.3+. |
|
48 | 50 |
|
49 | 51 | See: http://python-future.org |
50 | 52 |
|
51 | | -Also see the docstrings for each of these modules for more info:: |
52 | | -
|
53 | | -- future.standard_library |
54 | | -- future.builtins |
55 | | -- future.utils |
56 | | -
|
57 | 53 |
|
58 | 54 | Credits |
59 | 55 | ------- |
|
0 commit comments