Matt Wozniski writes: > Rather than introducing a new `open_utf8` function, I'd suggest the > following: > > 1. Deprecate calling `open` for text mode (the default) unless an > `encoding=` is specified,
For that, we should have a sentinel for "system default encoding" (as you acknowledge, but I want to foot-stomp it). The current dance to get that is quite annoying. > I think a __future__ import [of 'open_text' by some name] solves > the problem better than introducing a new function would. Only if you redefine the problem. If the problem is casual coders who want a quick-and-dirty ready-to-bake function to read UTF-8 when their default encodings are something else, then it's builtin or Just Don't -- teach them to copy-paste "encoding='utf-8'" FTW. I'm perfectly happy with "Just Don't" followed by "It's Time to Work on UTF-8 by Default". You'll have to ask Naoki how he feels about that. Your proposal (1. above) is an interesting one for that. Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/QQKQ5HYTR2RLVGUPH44I3QVOZGOD7QEK/ Code of Conduct: http://python.org/psf/codeofconduct/