More future! Make Python 2/3 compatibility a bit easier
Project description
More Future!
For old code written against Python2, plus some tiny useful functions
Recent Changes
December 2022 - No longer points to Python2 modules.
Description
Problem
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 to the same in these compatibility libraries is difficult.
Solution
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
try:
from io import StringIO
except:
from StringIO import StringIO
or
if PY3:
from io import StringIO
else:
from StringIO import StringIO
you can use mo-future
:
from mo_future import StringIO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mo-future-7.584.24095.tar.gz
.
File metadata
- Download URL: mo-future-7.584.24095.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fa6f36b291fa4625f0bd6b34db2083fac9c0fa0926428d6e4c7fd96fa486ba4 |
|
MD5 | e8d74b60a42ab2f3fb708e07be0f6dfa |
|
BLAKE2b-256 | 2f36b2148f8a07e7f7d8a3a4b1ee3d923a9c7400a68f73a2856a85ae43ddc2de |
File details
Details for the file mo_future-7.584.24095-py3-none-any.whl
.
File metadata
- Download URL: mo_future-7.584.24095-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d73800b8ed80280bbe911b287f00747f0cb905e6fae44a0396d5b742d245f1c |
|
MD5 | d31beca1a9bc690075679a51842421c0 |
|
BLAKE2b-256 | 20edda07c2d378878f344bd62f36e4a709cd6ff3502cf09b8369f0e2822f7064 |