diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_fileio.c | 2 | ||||
-rw-r--r-- | Modules/parsermodule.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_fileio.c b/Modules/_fileio.c index 4b35194..a946ea5 100644 --- a/Modules/_fileio.c +++ b/Modules/_fileio.c @@ -251,7 +251,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds) self->closefd = 1; if (!closefd) { PyErr_SetString(PyExc_ValueError, - "Cannot use closefd=True with file name"); + "Cannot use closefd=False with file name"); goto error; } diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index 652b07c..58d7dfb 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -1710,10 +1710,10 @@ static int count_from_dots(node *tree) { int i; - for (i = 0; i < NCH(tree); i++) + for (i = 1; i < NCH(tree); i++) if (TYPE(CHILD(tree, i)) != DOT) break; - return i; + return i-1; } /* 'from' ('.'* dotted_name | '.') 'import' ('*' | '(' import_as_names ')' | |