Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

Python isn't a low-level language, and there isn't *in general* a particular 
intention "to give a bound to memory usage". When using "buffer" in a general 
sense, rather than a buffer object (which is more akin to a byte-array), it's 
usually understood to mean a Python list (used as an array) and the capacity 
refers to the number of elements.

You may struggle to see a use case for specifying a buffer capacity as a number 
of elements rather than a byte size, but that doesn't mean that such use cases 
don't exist.

Are you perhaps using MicroPython in a constrained-memory environment?

In the 17 years that this code has been in Python, it's the first time AFAIK 
that anyone has raised the term "capacity" as potentially confusing, so I don't 
think such confusion is common. However, I'll be happy to update the 
documentation to clarify that "capacity" means "number of records buffered".

----------
assignee:  -> vinay.sajip
components: +Documentation -Library (Lib)
stage:  -> needs patch
type: behavior -> 

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32934>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to