开发者

Tool like 2to3, except for merges

I maintain a f开发者_StackOverflow中文版ork of my project for Python 3.1. When I initially made the port from 2.6, I used 2to3, but now I constantly have to merge new code from the 2.6 fork into the 3.1 fork. How can I perform the 2to3 operation on these merges automatically? (I use git, if it matters.)


Hmmm, you are in a tough position. Perhaps you could run 2to3 on the 2.6 fork, then merge the results of that into your 3.1 branch?

Alternatively, perhaps this pain will make you reconsider your strategy of maintaining two distinct branches for the two Python versions? I've had good luck using a single codebase for both versions: Running the same code on Python 2.x and 3.x

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜