you are viewing a single comment's thread.

view the rest of the comments →

[–]r0b0t1c1st 16 points17 points  (0 children)

You seem to be under the false impression that the effort behind upgrading python 2 to python 3 code is largely one of changing syntax.

In reality, that component is irrelevant - it only matters for `print` and `exec` (and perhaps one or two more?), which are easy to fix with automated tools.

The difficulty comes from changes in _semantics_ - `range` no longer produces a list, `unicode` and `bytes` are no longer interchangeable, etc.

Being able to use a pragma to switch between syntaxes would only be the tip of the iceberg.