3 ms·
Google has billions of lines of code, a non-trivial amount of which is Python. Moving to Python 3 would require an all-hands-on-deck massive effort.
by dsl 9y ago
Google has billions of lines of code, a non-trivial amount of which is Python. Moving to Python 3 would require an all-hands-on-deck massive effort.
- mseebach 9y agoYou can begin a transition without moving everything at once, or even ever. Start with a policy that all significant new efforts should strongly consider Python 3 (including porting any dependencies). Keep a "scoreboard" for un-ported dependencies and add a point every time it's decided to keep a new project in Python 2 because porting a certain dependency would be too much work to identify the bottleneck. Invest in porting those. You should see the proportion of Python 3 to 2 go up. Eventually, you're left with a relatively small set of legacy stuff in Python 2, and that's probably fine to keep like that.
- UncleMeat 9y agoThis works badly with monorepo and uniform build systems. Same reason why Google is still on cpp11.
- joshuamorton 9y agoThat said, you can (and Google has) invest in things that make porting easier. Enforce future imports, use six, etc.
- PopsiclePete 9y agoGoogle is on cpp11?? Impressive. Last time I read their guidelines, it read like a more conservative version of Bjarne's book from '98.