New submission from Марк Коренберг <socketp...@gmail.com>:
Pure-python implementation: if isinstance(o, (list, tuple)): C implementation: if (PyList_Check(obj) || PyTuple_Check(obj)) This make real difference (!) in my code. So, please change pure-python implementation to: if type(o) in (list, tuple): Or, fix C implementation to: /* intentionally forgot (only for this example) to check if return value is -1 */ if (PyObject_IsInstance(obj, PyList_Type) || PyObject_IsInstance(obj, PyTuple_Type) ---------- components: Library (Lib) messages: 161395 nosy: mmarkk priority: normal severity: normal status: open title: json C vs pure-python implementation difference versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14886> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com