[Python-ideas] Assignment decorators (Re: The Descriptor Protocol...)

Steven D'Aprano steve at pearwood.info
Tue Mar 8 14:07:33 CET 2011

Raymond Hettinger wrote:

> Just for the fun of it, here's my offering:
>     a := gizmo(arg1, arg2)
> is equivalent to
>     a = gimzo(arg1, arg2, __name__='a')

For what it's worth, this is the only proposal so far that I like.

> Disadvantage:
>   * I'm still not sure that the "problem" is worth solving.
>   * Between this and function annotations, it looks like Pascal is coming back.

Surely that's an advantage? *wink*

Cut-my-teeth-on-Pascal-and-it-didn't-do-me-any-harm-ly y'rs,


More information about the Python-ideas mailing list