Re: sys.stderr.write returns string length in Python 3

2008-07-23 Thread Fredrik Lundh
Alan G Isaac wrote: Can you give me an example of using the returned value? it's for consistency with stream objects that support raw I/O (as described in the PEP). when using buffered I/O, you can ignore it. /F -- http://mail.python.org/mailman/listinfo/python-list

sys.stderr.write returns string length in Python 3

2008-07-22 Thread Alan G Isaac
Is this new behavior intentional? :: sys.stderr.write(thisisatest\n) thisisatest 12 Here is the reason for it: help(sys.stderr.write) Help on method write in module io: write(self, s: str) method of io.TextIOWrapper instance Thank you, Alan

Re: sys.stderr.write returns string length in Python 3

2008-07-22 Thread Benjamin
Alan G Isaac wrote: Is this new behavior intentional? :: Yes, it's in the PEP http://www.python.org/dev/peps/pep-3116/. sys.stderr.write(thisisatest\n) thisisatest 12 Here is the reason for it: help(sys.stderr.write) Help on method write in module io:

Re: sys.stderr.write returns string length in Python 3

2008-07-22 Thread Alan G Isaac
Benjamin wrote: http://www.python.org/dev/peps/pep-3116/. Thanks. Can you give me an example of using the returned value? Alan -- http://mail.python.org/mailman/listinfo/python-list