mo-future-7.685.25166
توضیحات
More future! Make Python 2/3 compatibility a bit easier
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | mo-future-7.685.25166 |
| نام | mo-future |
| نسخه کتابخانه | 7.685.25166 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kyle Lahnakoski |
| ایمیل نویسنده | kyle@lahnakoski.com |
| آدرس صفحه اصلی | https://github.com/klahnakoski/mo-future |
| آدرس اینترنتی | https://pypi.org/project/mo-future/ |
| مجوز | MPL 2.0 |
# 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
```python
from future.utils import text
```
you get the same, but without having to discover what sub-module the `text` is hiding:
```python
from mo_future import text
```
### Simpler imports
Instead of writing conditional imports like
```python
try:
from io import StringIO
except:
from StringIO import StringIO
```
or
```python
if PY3:
from io import StringIO
else:
from StringIO import StringIO
```
you can use `mo-future`:
```python
from mo_future import StringIO
```
نحوه نصب
نصب پکیج whl mo-future-7.685.25166:
pip install mo-future-7.685.25166.whl
نصب پکیج tar.gz mo-future-7.685.25166:
pip install mo-future-7.685.25166.tar.gz