Author vstinner
Recipients loewis, pitrou, vstinner
Date 2010-05-05.01:08:24
SpamBayes Score 0.0889667
Marked as misclassified No
Message-id <>
Same issue for y#:

y# (...) This variant on s# doesn’t accept Unicode objects, only bytes-like objects.

s# (...) The string may contain embedded null bytes.


y* might mention that it accepts embedded null bytes.


grep 'PyArg_Parse[^"]\+"[^:;)"]*y[^*]' */*.c finds only usage of y# (no usage of y format):

 - mmap_gfind(), mmap_write_method()
 - oss_write(), oss_writeall()
 - in getsockaddrarg() with s->sock_family==AF_PACKET
 - in sock_setsockopt() if the option name is a string
 - socket_inet_ntoa(), socket_inet_ntop()

These functions have to support embedded null bytes. So I think that y# should specify explicitly that embedded null bytes are accepted.
Date User Action Args
2010-05-05 01:08:27vstinnersetrecipients: + vstinner, loewis, pitrou
2010-05-05 01:08:26vstinnersetmessageid: <>
2010-05-05 01:08:25vstinnerlinkissue8592 messages
2010-05-05 01:08:24vstinnercreate