Dictionaries keys in Python must be unique, no? In the test_data of task 3 Eggs is repeated and expected in the output!
Python dictionaries do not allow duplicate keys by default. Each key in a dictionary must be unique. [If you attempt to add a duplicate key, the value associated with that key will be updated instead of creating a new key-value pair.
isn’t that wrong? Thnak you and Exrcism is GREAT!
To save folks some time, this is the section in question: (python/exercises/concept/mecha-munch-management/dict_methods_test.py at adaa483944c0eb133deab5c1fbb828e15ec8e413 · exercism/python · GitHub
Yeah, I believe you’re correct that in the input data section, the second eggs value replaces the first eggs value. The way the output data is written, it’s testing for the value of the second eggs so there’s no error but there would be an error if we were expecting the first eggs value. . I suspect this may have been a copy and paste issue, but I’ll defer to the maintainers.
It is indeed a copypasta issue. I was going to hold off until I could report it was fixed, but have been sideswiped by other stuff today, so have not gotten to fixing it as of yet.
@1963jwg – any interest in submitting a PR? Otherwise, I will fix this as soon as I catch up on my other issues for today.
Thanks @BNAndras for your reply. .