More future! Make Python 2/3 compatibility a bit easier
For old code written against Python2, plus some tiny useful functions
December 2022 - No longer points to Python2 modules.
six are hard to use: It is easy to google how to import an object in Python2, or Python3, but finding the full path to the same 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.
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
Instead of writing conditional imports like
try: from io import StringIO except: from StringIO import StringIO
if PY3: from io import StringIO else: from StringIO import StringIO
you can use
from mo_future import StringIO
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for mo_future-7.449.23304-py2.py3-none-any.whl