Skip to main content

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

Project description


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


future or six are hard to use: It is easy to google how to import an object in Python2, or Python3, but finding the full path in these compatibility libraries is difficult.


All the modules and types required for compatibility are put into the mo-future top-level module so they are easy to find.

Flat namespace

Instead of

    from future.utils import text

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

    from mo_future import text

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.

Source Distribution

mo-future-6.230.22310.tar.gz (10.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page