3 ms·
The Zen of Python DOES NOT say "preferably one way" or "only one way", as often misquoted. As can be easily checked by `import this`, the relevant line says:
by BerislavLopac 7y ago
The Zen of Python DOES NOT say "preferably one way" or "only one way", as often misquoted. As can be easily checked by `import this`, the relevant line says:
There should be one-- and preferably only one --obvious way to do it.
The key word, so often ignored, is OBVIOUS.
Now, we can argue what "obvious" means, and what is more obvious to different people. But this one word makes a huge difference.
- deleted 7y ago[deleted]
- riffraff 7y agoI specifically said "preferably" for this reason, and there always will be more than one way to do it, so obvious is implied. This change explicitly creates a situation where you have two equivalent obvious ways to do one thing, dict.update() and dict.|=, and is the latest in a string of such changes. I personally _like_ this change, but python used to be much more conservative.