osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syntax for one-line "nonymous" functions in "declaration style"


On mer., Apr 3, 2019 at 6:00 PM, python-list-request at python.org wrote:
> On Wed, Apr 3, 2019 at 3:55 AM Alexey Muranov 
> <alexey.muranov at gmail.com> wrote:
>>  I clarified what i meant by an assignment, and i believe it to be a
>>  usual meaning.
>> 
>>    1. `def` is not an assignment, there is no left-hand side or
>>  right-hand side. I was talking about the normal assignment by which
>>  anyone can bind any value to any variable.
> 
> Actually, a 'def' statement DOES perform assignment. It does a bit
> more than that, but it definitely is assignment. You can easily check
> the CPython disassembly:

A command that performs an assignment among other things is not an 
assignment command itself.

Alexey.