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 pablogsal, serhiy.storchaka, vstinner
Date 2021-09-29.20:20:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632946856.3.0.298043712471.issue45325@roundup.psfhosted.org>
In-reply-to
Content
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);
History
Date User Action Args
2021-09-29 20:20:56vstinnersetrecipients: + vstinner, serhiy.storchaka, pablogsal
2021-09-29 20:20:56vstinnersetmessageid: <1632946856.3.0.298043712471.issue45325@roundup.psfhosted.org>
2021-09-29 20:20:56vstinnerlinkissue45325 messages
2021-09-29 20:20:56vstinnercreate