On Thu, Apr 16, 2020 at 10:02 AM <[email protected]> wrote:
> @
>
> > Do any other languages already have this feature?
>
> JavaScript ES6 has similar feature:
>
> ```javascript
> x = 1
> y = 2
> do_something({ x, y })
> ```
>
Rust also has a similar feature when instantiating structs which are always
keyword-based:
https://doc.rust-lang.org/book/ch05-01-defining-structs.html#using-the-field-init-shorthand-when-variables-and-fields-have-the-same-name
.
> _______________________________________________
> Python-ideas mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/64SUXRENNQDDE3YH6FLTKUR26QEMBK3R/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/OEO3JUVSNZNFLV24CEP46G2G5JDEVUEV/
Code of Conduct: http://python.org/psf/codeofconduct/