Martin Panter added the comment:

Here is a patch that allows any “C-contiguous” memoryview() to be cast to a 
byte view. Apart from the test that was explicitly checking that this wasn’t 
supported, the rest of the test suite still passes. I basically removed the 
check that was generating the “source format must be a native single character” 
error.

If two NANs are represented by the same byte sequence, I would expect their 
byte views to compare equal, which is the case with my patch.

----------
keywords: +patch
stage:  -> patch review
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file40139/cast-bytes.patch

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

Reply via email to