Message98333
Is io.FileIO.write() supposed to accept and implicitly encode Unicode strings as illustrated by this simple example?
>>> f = open("/dev/null","wb",buffering=0)
>>> f.write("Hello World\n")
12
>>>
Moreover, is the behavior of BufferedWriter objects supposed to be different as illustrated by this example:
>>> f = open("/dev/null","wb")
>>> f.write("Hello World\n")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: write() argument 1 must be bytes or buffer, not str
>>> |
|
Date |
User |
Action |
Args |
2010-01-26 13:10:13 | dabeaz | set | recipients:
+ dabeaz |
2010-01-26 13:10:12 | dabeaz | set | messageid: <1264511412.59.0.542411267876.issue7785@psf.upfronthosting.co.za> |
2010-01-26 13:10:11 | dabeaz | link | issue7785 messages |
2010-01-26 13:10:10 | dabeaz | create | |
|