Reply to post: Re: Reinventing a more limited wheel

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

Claptrap314 Bronze badge
Facepalm

Re: Reinventing a more limited wheel

No, and that is precisely the point. If you think that

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

is in any way equivalent to

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

then I don't want you on my team, and may I never be affected by any your code.

There is absolutely no way to ensure that f(x) is idempotent. If you don't understand that, then step away from the keyboard.

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