> f(**{u, v})

> I think a fundamental point is that `**{identifier}` looks like
> you are applying `**` unpacking to a set, but you actually aren't, it is
> a special syntactic form. If that disturbs you, I'm not going to say you
> are wrong.
>

The special syntactic form doesn't bother me that much.  '**dict' is
already a syntax error in many places, but allowed in a few other places.

I also do not think the purpose served is important enough to warrant a new
special form.  The actual same conciseness can be achieved with a function
that does just a little bit of magic, e.g.:

    func(**Q(u, v))

Someone linked to a library that apparently does the magic a bit better
than my 5-minute version (which required quoting the variable names).  I
think it was you who complained that sys._getframe() might be CPython
specific, which is true.  But probably other implementations could do
different magic to make their own Q(), so that seems of little importance.

I really doubt I'll ever use a magic function like Q()... but the fact that
I could have done so for the entire 20+ years that I've used Python tends
to emphasize that the need isn't REALLY that huge.  And if the need isn't
large, reserving new syntax for it isn't compelling.


-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/OOYAYSN6XGPIV3YR3UCCWQRU4O3JWTYQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to