STINNER Victor <victor.stin...@haypocalc.com> added the comment: 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. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8592> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com