[Python-Dev] bytes (original) (raw)

[Python-Dev] bytes / unicode

Stephen J. Turnbull stephen at xemacs.org
Fri Jun 25 18:37:58 CEST 2010


Ian Bicking writes:

I don't get what you are arguing against. Are you worried that if we make URL code polymorphic that this will mean some code will treat URLs as bytes, and that code will be incompatible with URLs as text? No one is arguing we remove text support from any of these functions, only that we allow bytes.

No, I understand what Guido means by "polymorphic".

I'm arguing that as I understand one of Philip Eby's use cases, "bytes" is a misspelling of "validated" and "unicode" is a misspelling of "unvalidated". In case of some kind of bug, polymorphic stdlib functions would allow propagation of unvalidated/unicode within the validated zone, aka "errors passing silently".

Now that I understand that that use case doesn't actually care about bytes vs. unicode string semantics at all, the argument becomes moot, I guess.



More information about the Python-Dev mailing list