Stefan Krah <stefan-use...@bytereef.org> added the comment: Rethinking a bit: Casting to arbitrary formats might go a bit far.
Currently, the combination (format=NULL, shape=NULL) can serve as a warning "This buffer has been cast to unsigned bytes". If we allow casts from bytes to int32, we'll have (format="i", shape=x) and consumers of that buffer have no indication that the original exporter had a different format. If you know what you are doing, fine. On the other hand following the buffer paths in #12817 quickly turned into a very complex maze of getbuffer requests. So, an option would be to try out the cast to bytes first and disallow other casts. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5231> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com