Author ezio.melotti
Recipients ezio.melotti, techtonik
Date 2013-04-28.07:47:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367135274.02.0.671828174045.issue17859@psf.upfronthosting.co.za>
In-reply-to
Content
Maybe the error could be replaced with something like:
TypeError: write() requires an object that supports the buffer interface, not '<type>'

But that's a bit long and also not entirely accurate, because the type accepted by write depends on the type of the file (binary or text).  The first problem could be solved by using "requires a bytes-like object"[0], the second problem could be fixed by omitting the name of the function:
TypeError: a bytes-like object is required, not '<type>'

[0]: #16518 has a discussion about the best term to describe "objects that support the buffer protocol"
History
Date User Action Args
2013-04-28 07:47:54ezio.melottisetrecipients: + ezio.melotti, techtonik
2013-04-28 07:47:54ezio.melottisetmessageid: <1367135274.02.0.671828174045.issue17859@psf.upfronthosting.co.za>
2013-04-28 07:47:54ezio.melottilinkissue17859 messages
2013-04-28 07:47:53ezio.melotticreate