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 lemburg
Recipients lemburg, vstinner
Date 2010-06-09.12:23:56
SpamBayes Score 0.014039636
Marked as misclassified No
Message-id <4C0F87DB.2040301@egenix.com>
In-reply-to <201006091401.58165.victor.stinner@haypocalc.com>
Content
STINNER Victor wrote:
> 
> STINNER Victor <victor.stinner@haypocalc.com> added the comment:
> 
> Le mercredi 09 juin 2010 13:06:53, vous avez écrit :
>> "s" accepts bytes via the buffer interface
> 
> No. "s*" and "s#" do accept any buffer compatible object (including bytes and 
> bytearray), but "s" doesn't.
> 
> I fixed recently the documentation about that.

Hmm, that sounds like an oversight to me. Why should "s" not accept
bytes when "s#" and "s*" do ?

The only difference between "s" and "s#" is that you work with
NUL-terminated strings as opposed to binary or text data with embedded
NULs. Even Unicode objects can contain embedded NULs, so from that
perspective there's no difference.
History
Date User Action Args
2010-06-09 12:24:06lemburgsetrecipients: + lemburg, vstinner
2010-06-09 12:23:57lemburglinkissue8949 messages
2010-06-09 12:23:56lemburgcreate