Ignore the state returned by __reduce__ if it is Py_None.

This commit is contained in:
Guido van Rossum 2003-01-31 21:10:31 +00:00
parent dda583df9a
commit 8e0ad0cb0b

View file

@ -2086,6 +2086,8 @@ save(Picklerobject *self, PyObject *args, int pers_save)
if (size > 2) {
state = PyTuple_GET_ITEM(t, 2);
if (state == Py_None)
state = NULL;
}
if (!( PyTuple_Check(arg_tup) || arg_tup==Py_None )) {