• Victor Stinner's avatar
    Issue #18408: slot_tp_str() must not fallback on slot_tp_repr() on error · 2e8474dd
    Victor Stinner yazdı
    type->tp_str must not point to slot_tp_str() if type has no __str__ attribute,
    so there is no reason for slot_tp_str() to fallback on slot_tp_str() on lookup
    error. Moreover, calling PyErr_Clear() may hide a real bug like MemoryError.
    
    If __str__ attribute is removed, slots must be updated (which is done by
    type_setattro()).
    2e8474dd
typeobject.c 200 KB