On Wed, 9 Jun 2010 13:57:05 +0200 Dirkjan Ochtman <dirk...@ochtman.nl> wrote: > On Wed, Jun 9, 2010 at 13:40, Antoine Pitrou <solip...@pitrou.net> wrote: > > No, I don't think so. If I'm using hex "encoding", it's because I want > > to see a text representation of some arbitrary bytestring (in order to > > display it inside another piece of text, for example). > > In other words, the purpose of hex is precisely to give a textual > > display of non-textual data. > > Or I want to encode binary data in a non-binary-safe protocol, in > which case I probably want bytes.
In this case you would probably choose a more space-efficient representation, such as base64 or base85. Which is why I think the purpose of hex is mostly for textual representation. Regards Antoine. _______________________________________________ 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