py-backwards icon indicating copy to clipboard operation
py-backwards copied to clipboard

Python to python compiler that allows you to use Python 3.6 features in older versions.

Results 30 py-backwards issues
Sort by recently updated
recently updated
newest added

源代码: d_on_cover = Critic(cover) d_loss_cov = AdversaryLoss(d_on_cover, d_target_label_cover) d_loss_cov.backward() 出现了报错: framework._dygraph_tracer()) RuntimeError: (NotFound) Cannot find gradient of variable dygraph_tmp_397@GRAD [Hint: Expected iter != accumulators_.end() == true, but received iter !=...

This PR adds more transformers and fixes some mypy errors. Note that this probably adds too many transformers (in particular the targets below 2.7), and I have marked it as...

It seems this one supports also preserving type comments: https://github.com/mbdevpl/typed-astunparse (in contrast with https://github.com/nvbn/py-backwards-astunparse).

Currently, typing is simply removed. But instead, it could be converted to comments so that type checking would still work.

The following code can't be converted from 3.6 to python 3.5 and the error seems to stem from something in py-backwards, I just can't figure out what. I tried it...

Tested with the heroku online demo: def foo(): truc = 5 return f'bidule {truc}' Result: ``` def foo(): truc = 5 return ''.join(['bidule ', '{}'.format(truc)]) ``` It works but kind...

Probably to `__matmul__` call.

See: #16 There is no perfect way to convert those. This pull requests reorders arguments which might not be OK for some. But if you used keyword arguments for all...