Verified Commit 6131db48 authored by Vladimír Štill's avatar Vladimír Štill
Browse files

Do not delete from dict we iterate over

parent 589e3059
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -288,7 +288,6 @@ class DFA:

        for state, character in transition:
            if transition[state, character] == rename:
                del transition[state, character]
                transition[state, character] = new_state

        self.transition = transition
@@ -415,4 +414,4 @@ class DFA:

    def is_canonical(self) -> bool:
        canonic = self.canonize()
        return DFA.is_part_identical(self, canonic)
 No newline at end of file
        return DFA.is_part_identical(self, canonic)