4 ms·
Sigh, that could have easily been implemented with a "use strict" directive. Or, `from __future__ import strict_unicode`. JavaScript has this strict mode, albei
by netheril96 9y ago
Sigh, that could have easily been implemented with a "use strict" directive. Or, `from __future__ import strict_unicode`. JavaScript has this strict mode, albeit to solve a different problem, and its success despite its messiness alludes to the notion that gradual improvement is better than sudden breakage.
- acdha 9y agoThe problem is that the byte-string confusion is widespread. You can import Unicode literals from future but you still need to update every bit of codec which works with files, network sockets, IPC, etc.
- masklinn 9y ago> Sigh, that could have easily been implemented with a "use strict" directive. You can already remove the implicit conversion in Python 2 (sys.setdefaultencoding(None)), it will break pretty much every non-trivial software as the standard library itself does not have strict separation and many of its "string" API operate on bytes. > JavaScript has this strict mode, albeit to solve a different problem That it solves a completely different and almost entirely syntactic issue is a bit of a difference there, you'll note that despite all of its changes the ES committee has refused to come even close to touching strings.