• Guido van Rossum's avatar
    Make StopIteration a sink state. This is done by clearing out the · 2147df74
    Guido van Rossum yazdı
    di_dict field when the end of the list is reached.  Also make the
    error ("dictionary changed size during iteration") a sticky state.
    
    Also remove the next() method -- one is supplied automatically by
    PyType_Ready() because the tp_iternext slot is set.  That's a good
    thing, because the implementation given here was buggy (it never
    raised StopIteration).
    2147df74
dictobject.c 49.9 KB