On 2018-08-23 03:10, Abe Dillon wrote:
[Chris Angelico]
Because your form cannot possibly work without some additional
information.
That isn't my form. That's PSEUDO CODE. Just like I wrote above it.
You're the one who's not listening.
The alternative I've suggested, for the thousanth time, is:
hand = sorted(cards, by=card.suit with card)
or
hand = sorted(cards, by=card.suit with(card))
The noise compared to the PSEUDO CODE looks like this:
hand = sorted(cards, by=card.suit ##########)
Which, to me, is preferable to:
hand = sorted(cards, ke#=#############card.suit)
You need me to type that out a few dozen more times?
You're complaining that it's "noise", but I think you need a bit of
noise to tell you that it's defining a function, otherwise you'll see an
expression and think it's evaluated immediately, but then you'll see the
"with" at the end telling you "oh, by the way, this is a function, so
don't evaluate it now".
You gave an example in JavaScript and said that students had "very
little trouble" with it, but notice how the function itself began with a
reserved word.
If you're complaining about the word "lambda", that's fine, but if
you're complaining about where the arguments should go, then I'm afraid
I'd have to say you're wrong.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/