On 21 April 2018 at 03:30, Chris Angelico <ros...@gmail.com> wrote: > There's that word "readability" again. Sometimes I wish the Zen of > Python didn't use it, because everyone seems to think that "readable" > means "code I like".
Readability is subjective, yes. But it's not the same as "liking". If a significant number of people say that they find a piece of code hard to read/understand, then that's a problem. It's all too easy to say "you don't have to write code like that", but as someone who has been a maintenance programmer for his whole career, I can tell you that people don't always have that luxury. And supporting code that's written in a language that prioritises "readability" (whatever that may mean) is a much easier task than supporting code written in a language that doesn't. There's a reason far fewer people write systems in Perl these days, and it's not because you can't write clear and maintainable code in Perl... I think that enough people have flagged up readability concerns, that the PEP should take that seriously. One improvement would be to limit the proposal to assignment of simple names (there have been far fewer complaints about readability for such examples). Another would be to simply address the concern more seriously than the current "This can be used to create ugly code" section. How about a heading like "Code that uses this construct could be difficult to maintain", with a discussion that acknowledges that maintenance programmers usually didn't write the code, and sometimes don't have the freedom to rewrite working code. It could mention other easy-to-misuse constructs like over-complicated comprehensions, and point out that in practice things haven't turned out as bad with those as was feared. Paul. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com