On 22.04.13 15:52, eli.bendersky wrote:
http://hg.python.org/cpython/rev/c9674421d78e
changeset:   83494:c9674421d78e
user:        Eli Bendersky <eli...@gmail.com>
date:        Mon Apr 22 05:52:16 2013 -0700
summary:
   Simplify the code of get_attrib_from_keywords somewhat.

-        PyDict_DelItem(kwds, attrib_str);
+        PyDict_DelItemString(kwds, ATTRIB_KEY);

PyDict_GetItemString() and PyDict_DelItemString() internally create a Python string. I.e. new code creates one additional string if attrib was found in kwds.

-    if (attrib)
-        PyDict_Update(attrib, kwds);
+    assert(attrib);

attrib can be NULL in case of memory allocation error.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to