Hi Jelle, I’ve stumbled upon buffer-related issues multiple times when typing with numpy, be It either with annotating functions such as `np.frombuffer` or when passing a numpy array to the likes of `memoryview` (resulting in a false positive by type checkers). All in all I’d say this buffer-type would very much be a welcome addition.
I do have a small remark about the name though: why not `BufferType` instead of `Buffer`? the classes in the `types` namespace generally have the `Type` suffix, so the lack thereof stands out a bit here. Regards, Bas From: Jelle Zijlstra <jelle.zijls...@gmail.com> Sent: Monday, 25 April 2022 05:47 To: Discussion of Numerical Python <numpy-discussion@python.org> Subject: [Numpy-discussion] PEP 688: Making the buffer protocol accessible in Python I just posted https://peps.python.org/pep-0688/, which proposes adding a types.Buffer type that will make it possible to check in Python code whether a type implements the buffer protocol. I'm reaching out to the numpy community because numpy was an important driver for creating the buffer protocol. I'd be happy to hear any feedback or possible use cases for the PEP.
_______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com