[Python-ideas] Does jargon make learning more difficult?

Chris Angelico rosuav at gmail.com
Tue Aug 21 14:58:26 EDT 2018


On Wed, Aug 22, 2018 at 4:56 AM, Abe Dillon <abedillon at 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


More information about the Python-ideas mailing list