Message107393
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. |
|
Date |
User |
Action |
Args |
2010-06-09 12:24:06 | lemburg | set | recipients:
+ lemburg, vstinner |
2010-06-09 12:23:57 | lemburg | link | issue8949 messages |
2010-06-09 12:23:56 | lemburg | create | |
|