[docs] Documentation bug in 2.7.3 version 4.4 section / minor error in Tutorial section 4.4

Zachary Ware zachary.ware at gmail.com
Sun Nov 18 17:06:35 CET 2012


Thanks for the reports, David and Julia.  This issue has been fixed
(see http://hg.python.org/cpython/rev/121872879e91).

On Mon, Nov 12, 2012 at 11:03 AM, David Ceresuela <davidzgz123 at gmail.com> wrote:
> Hello everyone!
>
> In the
> http://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops
> there are two print statements that I think are not correct.
> These are:
> - print("Found an even number", num)
> - print("Found a number", num)
>
> The output should be:
>>>> Found an even number 2
>>>> Found a number 3
>
> But instead I get:
>>>> ('Found an even number', 2)
>>>> ('Found a number', 3)
>
>
> Proposed solution is to delete the parentheses:
> Change
> print("Found an even number", num)
> to
> print "Found an even number", num
>
> That way the output I get matches the expected output
>
> _______________________________________________
> docs mailing list
> docs at python.org
> http://mail.python.org/mailman/listinfo/docs
>


More information about the docs mailing list