https://github.com/python/cpython/commit/58cbae22930486814cc01cf9f981d9fe5e0c68f9 commit: 58cbae22930486814cc01cf9f981d9fe5e0c68f9 branch: 3.6 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: Victor Stinner <victor.stinner at gmail.com> date: 2017年11月14日T01:35:13-08:00 summary: bpo-16055: Fixes incorrect error text for int('1', base=1000) (GH-4376) (#4389) (cherry picked from commit 28b624825eb92cb8c96fbf8da267d8d14a61a841) files: M Objects/longobject.c diff --git a/Objects/longobject.c b/Objects/longobject.c index 450087b5b15..c0cd7c12be2 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -4820,7 +4820,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; if ((base != 0 && base < 2) || base > 36) { PyErr_SetString(PyExc_ValueError, - "int() base must be >= 2 and <= 36"); + "int() base must be >= 2 and <= 36, or 0"); return NULL; }