Reply to post: Re: Reinventing a more limited wheel

Python creator Guido van Rossum sys.exit()s as language overlord

Tom 38 Silver badge

Re: Reinventing a more limited wheel

[(x, y, x/y) for x, y in ((x, f(x)) for x in input_data) if y > 0]

The new syntax is using less characters. This appeals to many programmers but I thought Python was not such a language.

At $JOB, that would immediately fail code review. Nested list comprehensions are hard to comprehend, particularly compared to assignment expressions, and disguise their purpose. Lets run through how many PEP-20 violations that is - its ugly, its complex, its nested, its dense and it has poor readability.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019