> > And then, what's the point of handling Unicode if we only accept > > Unicode-encoded ASCII strings? > > By accepting Unicode, I would specifically require that they, at > least: > - do not crash the interpreter when being passed Unicode objects > - attempt to perform some conversion if they do not support Unicode > directly; if they don't know any specific conversion, the default > conversion should be used (i.e. that they don't give a TypeError). > > With these assumptions, it is possible to allow print to pass Unicode > objects to the file's write method, instead of converting Unicode > itself. This, in turn, enables users to replace sys.stdout with > something that supports a different encoding. > > Of course, you still may get Unicode errors, since some streams may > not support all Unicode characters (e.g. since the terminal does not > support them). OK. That's very reasonable. What do we need to change to make this happen? --Guido van Rossum (home page: http://www.python.org/~guido/)
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