classification
Title: Swap keyword arguments in open() to make encoding easier to use
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.4
process
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 2013-10-19 17:08 by ezio.melotti. 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.
History
Date User Action Args
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