On Wed, Aug 22, 2018 at 4:56 AM, Abe Dillon <abedil...@gmail.com> wrote:
> [Chris Angelico]
>>
>> Okay, let's read that.
>> hand = # we're assigning this to the name 'hand'
>> sorted( # calling the function named 'sorted'
>> cards, # positional argument, whatever's in the 'cards' variable
>> by= # keyword argument, what comes next is the 'by' argument
>> value[card.suit] # subscript 'value' with 'card.suit'
>> if card is not wild # yep
>> else max_value # so we have an alternative
>> with card # WAIT WAIT WAIT
>> Once you get to 'with card', you have to go back and completely
>> reinterpret everything prior to that as a function.
>
>
> The revelation that it's a function should come when you read the "by" or
> "key". If you don't know what that parameter is, then that's where the "wait
> wait wiat!" should happen.

That right there is unacceptable. You should not have to know the
destination to understand what something fundamentally is. You can't
redefine language syntax based on the function being called.

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to