Skip to main content

[experimental] support Python 2 with fewer warts

Project description

The ``future`` module helps run Python 3.x-compatible code under Python 2.

It allows people to write clean, modern Python 3.x-compatible code today
and to run it with minimal effort under Python 2 alongside a Python 2
stack that may contain dependencies that have not yet been ported to
Python 3.

It is designed to be used as follows:

from __future__ import division, absolute_import, print_function
from future import (common_iterators, disable_obsolete_builtins,
str_as_unicode)
from future.features import super, range

followed by clean Python 3 code (with a few restrictions) that can run
unchanged on Python 2.7 or Python 3.3.

Soon we may also support this:

from future import standard_library

to bring in the new module names from the Python 3 standard library, so
imports like this will work on either Python 2.7 or Python 3.3:

import builtins
import configparser
import queue
# etc.: see standard_library_renames module for more info.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

future-0.0.3.tar.gz (14.1 kB view details)

Uploaded Source

File details

Details for the file future-0.0.3.tar.gz.

File metadata

  • Download URL: future-0.0.3.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for future-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3df7e0074a1c94c35dd2ce83d67d71e85eecb64f9e6bc9aa6737a1f31160adab
MD5 ed7f5b16a2de6886fc311582caa9dee3
BLAKE2b-256 703d8110f3a9eba14fa50ad8773a25715294117ce8364c3cb5b7fec3cec94b45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page