Christian Heimes <li...@cheimes.de> added the comment:
Py_BuildValue("y#", output, count) is equivalent to PyBytes_FromStringAndSize(output, count). The function returns a copy of the input string as a new bytes object. It's very unlikely that the code is broken. It's been around for ages and it's a core feature. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43435> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com