I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
sys.stdout.write(something)
something9
write() is appending the length of the
Jerzy Jalocha N wrote:
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
sys.stdout.write(something)
something9
write()
On Aug 24, 10:13 am, Jerzy Jalocha N jjalo...@gmail.com wrote:
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
import sys
n = sys.stdout.write('something')
something n
9
Yes, that works as expected, now, similar to 2.6.
Thank you both, Diez and André!
-Jerzy
--
http://mail.python.org/mailman/listinfo/python-list
Jerzy Jalocha N wrote:
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
sys.stdout.write(something)
On Mon, Aug 24, 2009 at 10:52 AM, Dave Angelda...@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