Re:Memory use in CPython and MicroPython
by masklinn on Monday July 03, 2017 @04:19AM
(#14686727)
> 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.
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.