Neal Norwitz wrote:
> We never really did address this issue did? A while back we talked
> about whether to assert vs check and do PyErr_BadInternalCall(). I
> don't remember a clear resolution (though my memory). I vaguely
> remember a preference towards asserting, but I don't know if that was
> in all cases or maybe it was just my preference. :-)
>
> I'm happy to assert here too. But it's really a broader question. I
> guess I'm even happy to just remove the X. It would be nice to handle
> this consistently going forward.
I would just remove the X.
If we want to handle it consistently, we would have to check all pointer
parameters in all functions; this would be a huge task (and for little
value, IMO).
In any case, "closure && PyTuple_Check(closure)" would be wrong, since
it then goes into
PyErr_Format(PyExc_SystemError,
"expected tuple for closure, got '%.100s'",
closure->ob_type->tp_name);
which crashes just the same.
Regards,
Martin
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com