This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Swap keyword arguments in open() to make encoding easier to use
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.4
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, py.user
Priority: normal Keywords:

Created on 2013-10-19 17:06 by py.user, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg200445 - (view) Author: py.user (py.user) * Date: 2013-10-19 17:06
>>> print(open.__doc__)
open(file, mode='r', buffering=-1, encoding=None,
     errors=None, newline=None, closefd=True, opener=None) -> file object

It would be handy to use
open('file.txt', 'r', 'utf-8')

instead of
open('file.txt', 'r', encoding='utf-8')
msg200447 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-10-19 17:08
That would be backward incompatible.
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63499
2013-10-19 17:08:57ezio.melottisetstatus: open -> closed

versions: - Python 3.3
nosy: + ezio.melotti

messages: + msg200447
resolution: rejected
stage: resolved
2013-10-19 17:06:22py.usercreate