While I was trying some stuffs in my Python 3 interpreter (Python 3.4.2, installed via brew), I encountered some weird outputs I didn't expected:
>>> import sys
>>> sys.stdout.write("foo")
foo3
>>> sys.stderr.write("bar")
3
bar
After experimenting with different strings, I think the number is the length of the inputs I pass.
I've tried this in Python 2.7.8 (gives no numbers in the outputs) and Python 3.4.2 created by virtualenv (gives the same result)
Is the output supposed to be like this?