5 ms·
"The Zen of Python" makes a number of lofty claims like that, but the actual language design doesn't embody them well if at all. To pick an example off the top
by RodgerTheGreat 12y ago
"The Zen of Python" makes a number of lofty claims like that, but the actual language design doesn't embody them well if at all. To pick an example off the top of my head, there are three syntaxes for string literals (single quote, double quote, triple quote) and three prefixes (raw, binary, unicode) which can be combined in a number of ways. As a result python offers 15 ways(!) to express a string literal.
- pekk 12y agoThat's really disingenuous. The "Zen of Python" is not bragging on the part of Python, but an expression of values in a community.
- TodPunk 12y agoHis point is that those values don't exist in most of the community as exemplified by their code and blogs, and this is largely because the language encourages straying from those values. I should note that I agree, and I'm a Python dev full time.
- duaneb 12y agoEach of those string literals has a purpose. There may be more than one way to create a string depending on what exactly you MEAN by a "string", and what the constraints of the code are.
- xorcist 12y agoThe standard library is not much better. There are three ways to load an URL, and a lot of people use neither but a third party library. Add a few more third party tools and you probably have active code paths to all variants throughout your code base. Speaking of third party libraries, you want to install those? Just go with distuils, no setuptools, no distribute, no distutils2, no distlib, no wait distutils again but a new one. I probably even missed a few. It's still my go to language for a lot of things, but I can't help but agree that design goal hasn't aged very well.