In the past, there's codecs which got replaced by io. Although it seems like it's more advisable to use io.open, most introductory python classes still teaches open.
There's a question with Difference between open and codecs.open in Python but is open a mere duck-type of io.open?
If not, why is it better to use io.open? And why is it easier to teach with open?
In this post (http://code.activestate.com/lists/python-list/681909/), Steven DAprano says that the built in open is using the io.open in the backend. So should we all refactored our code to use open instead of io.open?
Other than backward compatibility for py2.x, are there any reason to use io.open instead of open in py3.0?
help(open)and you'll see that it's the same asio.open()- even the heading saysHelp on built-in function open in module io, so in other words, there is no reason to useio.open()if you're writing a program in Python 3.io.openis only for backwards compatibility right? If so, I should start changing all the class materials forpython3=)pyupgrade's replacement ofio.open()withopen()in line with the accepted answer.