Irit Katriel <iritkatr...@gmail.com> added the comment:
On 3.11 I'm not getting str for the second expression, I get an empty bytes object: >>> import ctypes >>> class T(ctypes.Structure): ... _fields_ = ( ... ('member', ctypes.c_char * 16), ... ) ... >>> print('%r'%((ctypes.c_char * 16)()[:])) b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' >>> print('%r'%(T().member[:])) b'' ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue8161> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com