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 vstinner
Recipients loewis, pitrou, vstinner
Date 2010-05-05.01:08:24
SpamBayes Score 0.08896669
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