GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-131885: update documented signatures for `csv.{writer,reader}` by adamtheturtle · Pull Request #136085 · python/cpython Conversation
|
| if (!PyArg_UnpackTuple(args, "reader", 1, 2, &iterator, &dialect)) { | |
| Py_DECREF(self); | |
| return NULL; | |
| } | |
| self->input_iter = PyObject_GetIter(iterator); | |
| if (self->input_iter == NULL) { | |
| Py_DECREF(self); | |
| return NULL; | |
| } | |
| self->dialect = (DialectObj *)_call_dialect(module_state, dialect, | |
| keyword_args); |
PyArg_UnpackTuple unpacks positional arguments, so I would have thought that csv.writer(file, dialect="...") wouldn't work, but the catch is that _call_dialect checks if the dialect was non-NULL, and extracts it from the keywords if it is. But, there's nothing similar for csvfile, so this is the correct description for the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
csv.reader and `csv.wri…csv.{writer,reader}
|
Thanks @adamtheturtle for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…}` (pythonGH-136085) (cherry picked from commit 75f4059) Co-authored-by: Adam Dangoor <[email protected]>
…}` (pythonGH-136085) (cherry picked from commit 75f4059) Co-authored-by: Adam Dangoor <[email protected]>
|
GH-136120 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-136121 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.