Martin Blais <blais at furius.ca> writes: > What if we could completely disable the implicit conversions between > unicode and str? In other words, if you would ALWAYS be forced to > call either .encode() or .decode() to convert between one and the > other... wouldn't that help a lot deal with that issue? I don't know. I've made one or two apps safe against this and it's mostly just annoying. > How hard would that be to implement? import sys reload(sys) sys.setdefaultencoding('undefined') > Would it break a lot of code? Would some people want that? (I know > I would, at least for some of my code.) It seems to me that this > would make the code more explicit and force the programmer to become > more aware of those conversions. Any opinions welcome. I'm not sure it's a sensible default. Cheers, mwh -- It is never worth a first class man's time to express a majority opinion. By definition, there are plenty of others to do that. -- G. H. Hardy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4