Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

IMO, the *_FromFormat functions are wrong to decide whether the args
object is a mapping. the code is:
    if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
        !PyObject_TypeCheck(args, &PyBaseString_Type))
        dict = args;

But heap types always fill tp_as_mapping: it points to
PyHeapTypeObject.as_mapping, whose members may be NULL...
PyMapping_Check() would be more appropriate.

----------
resolution: invalid -> 
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6396>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to