diff options
author | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-10 12:25:11 (GMT) |
---|---|---|
committer | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-10 12:25:11 (GMT) |
commit | a8292636c60aa1fd0f104391d264df772d3298b1 (patch) | |
tree | c34b3bf37ff26475787a66cbe901ea8f3fdc325f /Modules/_csv.c | |
parent | 37d2bdfa763a8dc8928d5576903d6c2d714e2201 (diff) | |
download | cpython-a8292636c60aa1fd0f104391d264df772d3298b1.zip cpython-a8292636c60aa1fd0f104391d264df772d3298b1.tar.gz cpython-a8292636c60aa1fd0f104391d264df772d3298b1.tar.bz2 |
When parsing args that return a single character, treat null string the
same as None.
Diffstat (limited to 'Modules/_csv.c')
-rw-r--r-- | Modules/_csv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index e7f60c1..7eb1e22 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -207,7 +207,7 @@ _set_char(const char *name, char *target, PyObject *src, char dflt) if (src == NULL) *target = dflt; else { - if (src == Py_None) + if (src == Py_None || PyString_Size(src) == 0) *target = '\0'; else if (!PyString_Check(src) || PyString_Size(src) != 1) { PyErr_Format(PyExc_TypeError, |