Python dictionary highlighter #4584
Replies: 1 comment
-
The reason why your screenshot isn't optimal is twofold: We normally do highlight differences within the line to make it easier to spot the mistakes. For exercises with a lot of output/tests it can take a while (sometimes up to a minute) to generate those diffs and it produces a lot of html causing some browser to crash. This is why we heuristically fall back to a simpler diffing algorithm. In this case, the long line length in your screenshot triggered our fallback. Even if we would use the complete diff, it still wouldn't be easy to spot the mistakes in this case. This is because the order of elements in dictionaries isn't guaranteed. The creator of the exercise (@pdawyndt ?) could possibly improve this by tweaking the exercise or tests. |
Beta Was this translation helpful? Give feedback.
-
When comparing dictionaries in tests, students are often presented with a visual similar to one below when they get a test case wrong.
This makes debugging their code extremely tedious.
Requested feature: highlight the differences in the expected vs actual dictionary, like it's done when comparing strings.
Beta Was this translation helpful? Give feedback.
All reactions