[pydotorg-www] EditorsGroup Addition

Chris Angelico rosuav at gmail.com
Fri Feb 2 13:14:46 EST 2018


On Sat, Feb 3, 2018 at 3:05 AM, Mack L <mckcard at gmail.com> wrote:
> Account Name: Accountant
>
>
>
> Intended Edits: Wish to update the example codes in the ForLoop section. An
> example would be that the website shows this code;
>
>
>
> x = 1
>
> while True:
>
>     print "To infinity and beyond! We're getting close, on %d now!" % (x)
>
>     x += 1
>
>
>
>
>
> While the required code for current 3.6.x python to run it is;
>
>
>
> x = 1
>
> while True:
>
>     print("To infinity and beyond! We're getting close, on %d now!"%(x))
>
>     x += 1
>
>
>
> Other such examples, on the ForLoop page, as this are not completely correct
> to copy and pasting into current Python for new users to see and play with.
>

What you're proposing is to make the examples Python 3 compatible.
Excellent! Thank you. If you are able to, can you check to make sure
that they still work in Python 2 as well? (The example you give here
would indeed work in both versions, as you give it.)

You have editing powers. Use them for good and not for evil, to help
people and not to harm them, to brew coffee and not ... wait, what am
I saying? This is just a wiki, it's not the secret world domination
toolshed...

ChrisA


More information about the pydotorg-www mailing list