Skip to content

Document BytesIO buffer size #133521

Open
Open
@jxu

Description

@jxu

https://stackoverflow.com/questions/26827055/python-how-to-get-bytesio-allocated-memory-length

The length of the data stored in a BytesIO object can be accessed in several ways. The best way seems to be getbuffer().nbytes. But it's not documented here
https://docs.python.org/3/library/io.html#io.BytesIO

Only here, the gigantic built-in types page https://docs.python.org/3/library/stdtypes.html#memoryview.nbytes

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtopic-IO

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions