[Python-ideas] a new bytestring type?
Stephen J. Turnbull
stephen at xemacs.org
Mon Jan 6 08:35:28 CET 2014
Ethan Furman writes:
> How many would be interested in having a 'bytestring'?
-1. It's an attractive nuisance.
> What do you see as the distinguishing characteristics?
Its main attraction is that it allows people who in practice only ever
deal with one non-Unicode encoding to ignore the fact that their data
is in fact encoded, and that their applications are very likely not
robust to data encoded differently.
While I sympathize with their problem to some extent (especially
people who are writing low-level web services), I don't think you'd
ever again be able to trust a 3rd- party module in a web context
without doing a thorough audit to ensure that all uses of
'bytestrings' are appropriate in themselves and appropriately guarded
against leaking garbage into other contexts. Thus, "attractive
nuisance."
More information about the Python-ideas
mailing list