P3 weird sys.stdout.write()
Jerzy Jalocha N
jjalocha at gmail.com
Mon Aug 24 11:25:15 EDT 2009
On Mon, Aug 24, 2009 at 10:52 AM, Dave Angel<davea at ieee.org> wrote:
> The write() function changed in 3.0, but not in the way you're describing.
> It now (usually) has a return value, the count of the number of characters
> written.
[...]
> But because you're running from the interpreter, you're seeing the return
> value(9), which is suppressed if it's None, which it was in 2.x. This has
> nothing to do with how the language behaves in normal use.
This makes it much clearer!
You are right, output in a shell script is "normal", without the return value.
Thank you, Dave.
-Jerzy
More information about the Python-list
mailing list