3 ms·
There should be one-- and preferably only one --obvious way to do it. “There is not too many ways to initialize and merge dicts in python. Let’s add one more!”
by nrvn 7y ago
There should be one-- and preferably only one --obvious way to do it.
“There is not too many ways to initialize and merge dicts in python. Let’s add one more!”
Which one is idiomatic now?
Imagine a large codebase where all these possible ways of doing one thing are inconsistent and misaligned.
I remember myself replacing % string format notation with .format() everywhere. Just for the sake of consistency. And then they introduced one more way to format strings...
[0]: https://www.python.org/dev/peps/pep-0584/#motivation https://www.python.org/dev/peps/pep-0584/#motivation