Skip to content

Swap keyword arguments in open() to make encoding easier to use #63499

Closed

Description

@py-user
mannequin
BPO 19300
Nosy @ezio-melotti, @py-user

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-10-19.17:08:57.196>
created_at = <Date 2013-10-19.17:06:22.660>
labels = ['interpreter-core', 'type-feature']
title = 'Swap keyword arguments in open() to make encoding easier to use'
updated_at = <Date 2013-10-19.17:08:57.194>
user = 'https://github.com/py-user'

bugs.python.org fields:

activity = <Date 2013-10-19.17:08:57.194>
actor = 'ezio.melotti'
assignee = 'none'
closed = True
closed_date = <Date 2013-10-19.17:08:57.196>
closer = 'ezio.melotti'
components = ['Interpreter Core']
creation = <Date 2013-10-19.17:06:22.660>
creator = 'py.user'
dependencies = []
files = []
hgrepos = []
issue_num = 19300
keywords = []
message_count = 2.0
messages = ['200445', '200447']
nosy_count = 2.0
nosy_names = ['ezio.melotti', 'py.user']
pr_nums = []
priority = 'normal'
resolution = 'rejected'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue19300'
versions = ['Python 3.4']

Activity

  1. py-user commented on Oct 19, 2013

    py-usermannequin
    MannequinAuthor
    >>> 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')

  2. ezio-melotti commented on Oct 19, 2013

    @ezio-melotti
    Member

    That would be backward incompatible.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions