commit | 7ed0a6583188e3fdfd8912f05a5219771c419cf1 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Mar 21 20:36:45 2007 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Wed Mar 21 20:36:45 2007 +0000 |
tree | df6721bdc767ed51179775dc486b5e5a519c8295 | |
parent | e1b4a7e1f90f879d194dd48dfef8a1c8a187faad [diff] [blame] |
Test and fix fromkeys optional argument.
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index acf5ae3..bc3cd53 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c
@@ -1186,8 +1186,8 @@ while (_PySet_NextEntry(seq, &pos, &key, &hash)) { Py_INCREF(key); - Py_INCREF(Py_None); - if (insertdict(mp, key, hash, Py_None)) + Py_INCREF(value); + if (insertdict(mp, key, hash, value)) return NULL; } return d;