Skip to main content

More future! Make Python 2/3 compatibility a little bit easier

Project description

More future! Make Python 2/3 compatibility a little bit easier


All the data types that have changed, and all the libraries that have moved, are put into the mo-future top-level module so it is easy to find.

This module is only intended for the ``mo-*`` series of libraries, but pull requests are welcome

Replaces future or six

Many of the compatibility types declared by future or six are in mo-future

Flat namespace

All compatibility types are top-level

Instead of

from future.utils import text_type

you get the same, but without having to discover what sub-module the text_type is hiding:

from mo_future import text_type

Simpler imports

Instead of writing conditional imports like

    from io import StringIO
    from StringIO import StringIO


if PY3:
    from io import StringIO
    from StringIO import StringIO

you can use mo-future:

from mo_future import StringIO

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
mo-future-2.18.18240.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None Aug 28, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page