osdir.com


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

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


On Tue, Apr 2, 2019 at 6:04 PM Ian Kelly <ian.g.kelly at gmail.com> wrote:
> > Note that
> >
> >     foo.bar = baz
> >
> > and
> >
> >     foo[bar] = baz
>
> I wrote "directly assigned to a variable", not to an attribute or an item.
> These are not part of the suggestion.

So what's the advantage over just using def?

ChrisA