Add code examples #14
Comments
|
How about using 2to3 convert the code and test which will help 2to3 to reach accuracy in conversion? |
|
That doesn't make a lot of sense - the point is to show the difference between the two, or at least highlight 3 - not to test 2to3, since it is mostly accurate. On Wednesday, December 14, 2011 at 10:36 AM, kracekumar wrote:
|
|
Fine. Then generating code from 2to3 will make sense and if it is feasible to run 2to3 as background process to do it. For simplicity we can add py3 code directly. Idea For implementing: Let user enter or author enter the code as follow: To highlight keywords we need to link to google's prettyprint and code should be replaced as
else embed pyt3 & py2 directly inside the tag |
|
that is an interesting idea - a live 2to3 translation - open a new ticket - that's beyond the capabilities of the site right now, but a good idea! On Wednesday, December 14, 2011 at 10:58 AM, kracekumar wrote:
|
|
Sure. |
We need a side by side code example using the twitter bootstrap mechanisms for code viewing that shows Python 2 versus Python 3 code (and how little changes are needed) on the site.
The text was updated successfully, but these errors were encountered: