Greg Ewing wrote: > Hmmm, the problem here, I think, is that tp_clear is > really only designed for use by the garbage collector. > Giving anything else access to it is probably wrong. > > Clearability is not a general feature in Python land -- > a few types have a clear() method, but this is an > ad hoc feature of the type concerned. I don't think > it makes sense to have a general PyObject_Clear > function at all.
I agree. Barry's PySet_Clear and Raymond's PyObject_Clear would be two completely unrelated functions (one invoking the "clear" method, the other invoking tp_clear). Regards, Martin _______________________________________________ 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