Author vstinner
Recipients loewis, pitrou, vstinner
Date 2010-05-05.01:08:24
SpamBayes Score 0.0889667
Marked as misclassified No
Message-id <1273021706.95.0.595372227762.issue8592@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-05-05 01:08:27vstinnersetrecipients: + vstinner, loewis, pitrou
2010-05-05 01:08:26vstinnersetmessageid: <1273021706.95.0.595372227762.issue8592@psf.upfronthosting.co.za>
2010-05-05 01:08:25vstinnerlinkissue8592 messages
2010-05-05 01:08:24vstinnercreate