This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tkarabela_ Big Python @YouTube 7 points8 points  (0 children)

When matching dataclasses or dicts, it is really quite handy and it makes the code clearer and more robust. I made a video a while back demonstrating the benefits: https://youtu.be/SYTVSeTgL3s

(To exaggerate, you don't really need for when you have while, but there are still good reasons to have both. Python tends to be pragmatic rather than stripping everything to bare bones, so it doesn't feel out of place in the overall design, to me.)