STINNER Victor <vstin...@python.org> added the comment:
I would be interested to see how the "p" format could be used in existing code. I found a few places would benefit of it. Either create a new draft PR, or put it in the same PR 28634. Modules/_itertoolsmodule.c: return Py_BuildValue("O(N)(OO)", Py_TYPE(lz), it, lz->saved, Py_True); return Py_BuildValue("O(O)(OO)", Py_TYPE(lz), lz->it, lz->saved, lz->firstpass ? Py_True : Py_False); Modules/_ssl.c: ok = RAND_bytes((unsigned char*)PyBytes_AS_STRING(bytes), len); if (ok == 0 || ok == 1) return Py_BuildValue("NO", bytes, ok == 1 ? Py_True : Py_False); return Py_BuildValue( "{sksssssssisi" "sOssssssss" "}", "id", cipher_id, "name", cipher_name, "protocol", cipher_protocol, "description", buf, "strength_bits", strength_bits, "alg_bits", alg_bits ,"aead", aead ? Py_True : Py_False, "symmetric", skcipher, "digest", digest, "kea", kx, "auth", auth ); Modules/main.c: runargs = PyTuple_Pack(2, module, set_argv0 ? Py_True : Py_False); Objects/fileobject.c: stream = _PyObject_CallMethodId(io, &PyId_open, "isisssO", fd, mode, buffering, encoding, errors, newline, closefd ? Py_True : Py_False); ---------- nosy: +vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45325> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com