Martin Panter added the comment:

As far as I know, non-ASCII newlines and whitespace are not supported in Python 
source code, so there is not a big need to support it in bytes.fromhex() 
either. But since bytes.fromhex() accepts Unicode strings, I think non-ASCII 
whitespace would be okay if it was easy to implement.

Serhiy: Whitespace is not treated specially by the base-64 decoders, it is just 
treated like any non-alphabet character. See 
<https://docs.python.org/3/library/base64.html#base64.b64decode> and 
b64decode(validate=True).

Regarding hex-codec, I doubt many people use it in Python 3. To decode a whole 
string, binascii.unhexlify() or bytes.fromhex() is probably more obvious, and I 
think the incremental decoder never worked properly (Issue 20132).

----------

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

Reply via email to