This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dabeaz
Recipients dabeaz
Date 2010-01-26.13:10:10
SpamBayes Score 5.812179e-09
Marked as misclassified No
Message-id <1264511412.59.0.542411267876.issue7785@psf.upfronthosting.co.za>
In-reply-to
Content
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
>>>
History
Date User Action Args
2010-01-26 13:10:13dabeazsetrecipients: + dabeaz
2010-01-26 13:10:12dabeazsetmessageid: <1264511412.59.0.542411267876.issue7785@psf.upfronthosting.co.za>
2010-01-26 13:10:11dabeazlinkissue7785 messages
2010-01-26 13:10:10dabeazcreate