Interactive entered code, inserts spurious numbers.
Chris Angelico
rosuav at gmail.com
Fri Jul 31 05:02:36 EDT 2015
On Fri, Jul 31, 2015 at 6:47 PM, Antoon Pardon
<antoon.pardon at rece.vub.ac.be> wrote:
> That is different behaviour from python2, which gives me
> the expected result. My guess is that the write returns
> 11, being the number of characters written en that the
> interpreter, shows that each time through the loop.
>
> But is this the expected behaviour in python3? I find
> it annoying.
It is; it's the behaviour of the interactive interpreter. If you want
to disable that, change sys.displayhook to not print stuff out, or
assign to a dummy variable.
ChrisA
More information about the Python-list
mailing list