[issue27501] Add typing.py class describing a PEP 3118 buffer object

2020-05-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2020-05-19 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2019-11-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Cross-ref to the typing issue https://github.com/python/typing/issues/593. It looks like there is some interest in this feature. -- ___ Python tracker

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looking at the patch, I'm thinking that this endeavor isn't at all worthwhile. We don't need an ABC for everything especially if there in no pure python API involved. I recommend closing this one until there is a proven need and a clear path forward.

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-14 Thread Daniel Moisset
Daniel Moisset added the comment: As a description of the idea I'm attaching a rough patch with an implementation. Some tests fail because of the following: 1) I didn't find a good place to register the Buffer ABC for mmap.mmap, and array.mmap; the modeules themselves are C extensions (and

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-14 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-13 Thread Daniel Moisset
Daniel Moisset added the comment: OK. Just to give an obvious example of a place where this would be useful for annotations is in the argument for the memoryview() builtin (currently declared with "# TODO arg can be any obj supporting the buffer protocol" in the standard library typesheds)

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Since collections.abc is the wrong place, I'll change the title of this to typing and see if any of the typing aficionados think it is sufficiently useful (they are deliberately focusing on common use cases first since the whole static typing endeavor is