This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月22日 07:07 by hynek, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue14880.patch | cvrebert, 2012年08月27日 05:50 | fix all 3 instances of fmtparam | review | |
| Messages (8) | |||
|---|---|---|---|
| msg161332 - (view) | Author: Hynek Schlawack (hynek) * (Python committer) | Date: 2012年05月22日 07:07 | |
It says > csv.reader(csvfile[, dialect='excel'][, fmtparam]) > csv.writer(csvfile[, dialect='excel'][, fmtparam]) in 2.7. I presume it should be like in 3.x: > csv.reader(csvfile, dialect='excel', **fmtparams) > csv.writer(csvfile, dialect='excel', **fmtparams) Or am I missing something? (I found argument renaming to be too invasive for my default-args-notation ticket #14804) |
|||
| msg161333 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2012年05月22日 07:12 | |
I verified from the source that it should be **fmtparams also in 2.7. Make sure you change the description texts, too, to s/fmtparam/fmtparams/. |
|||
| msg169192 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2012年08月27日 10:02 | |
Chris: Thanks for the patch. I'm not sure register_dialect()'s signature is good like that, though. Hynek, what do you think? |
|||
| msg169254 - (view) | Author: Hynek Schlawack (hynek) * (Python committer) | Date: 2012年08月28日 06:45 | |
What does bother you? Both sigs look like in py3 if I'm looking correctly. |
|||
| msg169261 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2012年08月28日 09:40 | |
Well, I wasn't sure about [optional] params before **kwargs. But if that's ok, then I think the patch is good. |
|||
| msg169265 - (view) | Author: Hynek Schlawack (hynek) * (Python committer) | Date: 2012年08月28日 10:19 | |
It seems correct like that:
static PyObject *
csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *name_obj, *dialect_obj = NULL;
PyObject *dialect;
if (!PyArg_UnpackTuple(args, "", 1, 2, &name_obj, &dialect_obj))
return NULL;
Therefore going to commit.
|
|||
| msg169267 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年08月28日 10:35 | |
New changeset dc080e19f7aa by Hynek Schlawack in branch '2.7': #14880: Fix kwargs notation in csv.reader, .writer & .register_dialect http://hg.python.org/cpython/rev/dc080e19f7aa |
|||
| msg169268 - (view) | Author: Hynek Schlawack (hynek) * (Python committer) | Date: 2012年08月28日 10:36 | |
Thank you for your contribution Chris! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59085 |
| 2012年08月28日 10:36:29 | hynek | set | status: open -> closed resolution: fixed messages: + msg169268 stage: patch review -> resolved |
| 2012年08月28日 10:35:28 | python-dev | set | nosy:
+ python-dev messages: + msg169267 |
| 2012年08月28日 10:19:58 | hynek | set | messages: + msg169265 |
| 2012年08月28日 09:40:28 | petri.lehtinen | set | messages: + msg169261 |
| 2012年08月28日 06:45:47 | hynek | set | messages: + msg169254 |
| 2012年08月27日 10:02:51 | petri.lehtinen | set | messages:
+ msg169192 stage: patch review |
| 2012年08月27日 05:50:14 | cvrebert | set | files:
+ issue14880.patch keywords: + patch |
| 2012年05月22日 21:00:22 | cvrebert | set | nosy:
+ cvrebert |
| 2012年05月22日 07:12:21 | petri.lehtinen | set | nosy:
+ petri.lehtinen messages: + msg161333 |
| 2012年05月22日 07:07:35 | hynek | create | |