mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Add an errors parameter to open() and TextIOWrapper() to specify error handling.
This commit is contained in:
parent
c6fe37bab9
commit
e7fc50f2d0
7 changed files with 77 additions and 17 deletions
|
@ -770,7 +770,7 @@ initstdio(void)
|
|||
#endif
|
||||
}
|
||||
else {
|
||||
if (!(std = PyFile_FromFd(fd, "<stdin>", "r", -1, NULL,
|
||||
if (!(std = PyFile_FromFd(fd, "<stdin>", "r", -1, NULL, NULL,
|
||||
"\n", 0))) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ initstdio(void)
|
|||
#endif
|
||||
}
|
||||
else {
|
||||
if (!(std = PyFile_FromFd(fd, "<stdout>", "w", -1, NULL,
|
||||
if (!(std = PyFile_FromFd(fd, "<stdout>", "w", -1, NULL, NULL,
|
||||
"\n", 0))) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -811,7 +811,7 @@ initstdio(void)
|
|||
#endif
|
||||
}
|
||||
else {
|
||||
if (!(std = PyFile_FromFd(fd, "<stderr>", "w", -1, NULL,
|
||||
if (!(std = PyFile_FromFd(fd, "<stderr>", "w", -1, NULL, NULL,
|
||||
"\n", 0))) {
|
||||
goto error;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue