-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed as not planned
Closed as not planned
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
list where I found error message inconsistencies:
io.open()_ioimpl raise:TypeError: open() missing required argument 'file' (pos 1)_pyioimpl raise:TypeError: open() missing 1 required positional argument: 'file'
io.open("file.txt", mode="")_ioimpl raise:ValueError: Must have exactly one of create/read/write/append mode and at most one plus_pyioimpl raise:ValueError: must have exactly one of read/write/append mode
io.open("file.txt", mode=None)_ioimpl raise:TypeError: open() argument 'mode' must be str, not None_pyioimpl raise:TypeError: invalid mode: None
io.open('file.txt', buffering="")_ioimpl raise:TypeError: 'str' object cannot be interpreted as an integer_pyioimpl raise:TypeError: invalid buffering: ''
io.open('file.txt', encoding=0)_ioimpl raise:TypeError: open() argument 'encoding' must be str or None, not int_pyioimpl raise:TypeError: invalid encoding: 0
io.open('file.txt', errors=0)_ioimpl raise:TypeError: open() argument 'errors' must be str or None, not int_pyioimpl raise:TypeError: invalid errors: 0
io.open('file.txt', newline=0)_ioimpl raise:TypeError: open() argument 'newline' must be str or None, not int_pyioimpl raise:TypeError: illegal newline type: <class 'int'>
I'm ready to take on
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error