On Nov 4, 2006, at 3:15 AM, Martin v. Löwis wrote: > Alexander Belopolsky schrieb: >> Multi-segment buffers are only dead because standard library modules >> do not support them. > > That, in turn, is because nobody has contributed code to make that > work. > My guess is that people either don't need it, or find it too difficult > to implement.
Last time I tried to contribute code related to buffer protocol, it was rejected with little discussion http://sourceforge.net/tracker/index.php? func=detail&aid=1539381&group_id=5470&atid=305470 that patch implemented two features: enabled creation of read-write buffer objects and added readinto method to StringIO. The resolution was: """ The file object's readinto method is not meant for public use, so adding the method to StringIO is not a good idea. """ The read-write buffer part was not discussed, but I guess the resolution would be that buffer objects are deprecated, so adding features to them is not a good idea. > > If you are curious, try adding such a feature to re some time. I > expect that implementing it would be quite involved. I wonder what > Fredrik Lundh thinks about providing such a feature. I would certainly invest some time into that if that feature had a chance of being accepted. At the moment I feel that anything related to buffers or buffer protocol is met with strong opposition. I think the opposition is mostly fueled by the belief that buffer objects are "unsafe" and buffer protocol is deprecated. None of these premises is correct AFAIK. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com