You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hoping to actually use pasteurize to maintain a py2 branch of a py3 codebase, langcodes.
Right now I change all the py3 syntax to py2 syntax manually in a branch of unmerged git commits, which is a pain. It would be great if pasteurize could automate this.
One issue I've run into: pasteurize doesn't know what to do with the "yield from" syntax. When it appears as a statement on its own, it can be translated straightforwardly, if a bit inefficiently. For example, the syntax
yieldfromparse_item(lines)
can become:
for_iteminparse_item(lines):
yield_item
It would probably be much harder to translate the expression form, result = yield from parse_item(lines). I can't think of a good way. PEP 380 has a 39-line monstrosity as the translation.
The text was updated successfully, but these errors were encountered:
I'm hoping to actually use pasteurize to maintain a py2 branch of a py3 codebase, langcodes.
Right now I change all the py3 syntax to py2 syntax manually in a branch of unmerged git commits, which is a pain. It would be great if pasteurize could automate this.
One issue I've run into: pasteurize doesn't know what to do with the "yield from" syntax. When it appears as a statement on its own, it can be translated straightforwardly, if a bit inefficiently. For example, the syntax
can become:
It would probably be much harder to translate the expression form,
result = yield from parse_item(lines)
. I can't think of a good way. PEP 380 has a 39-line monstrosity as the translation.The text was updated successfully, but these errors were encountered: