nvbn / py-backwards

Python to python compiler that allows you to use Python 3.6 features in older versions.
306 stars 17 forks source link

move runtime helpers into separate package #30

Open graingert opened 7 years ago

graingert commented 7 years ago
def _py_backwards_merge_dicts(dicts):
    result = {}
    for dict_ in dicts:
        result.update(dict_)
    return result

_py_backwards_merge_dicts(...)

could be

import py_backwards_some_module_name as _py_backwards

 _py_backwards.merge_dicts(...)
nvbn commented 7 years ago

It can't be part of py_backwards package, because it's not possible to install py_backwards on python < 3.3.

I think it would be better to have something like py_backwards_runtime or py_backwards_polyfill.

graingert commented 7 years ago

that module itself would be compiled with py_backwards, but all the transformers that require runtime helpers would have to be disabled.