On Tue, 20 Oct 2020 at 17:04, Steven D'Aprano <st...@pearwood.info> wrote:
>
> In general, Python bindings are *all or nothing* -- either all the
> targets get bound, or none of them.

I wonder if this could work with the proposed pattern matching
statement. The current proposal doesn't allow it, but maybe a future
enhancement would make something like this possible:

    match the_input:
        case "{one} {two} {three}": print("Got three numbers", one, two, three)

You'd need some sort of "matching object" rather than a string there
(strings already have a meaning in the proposal) but maybe something
could be made to work?

Paul
_______________________________________________
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/C7DVHQHCHWVZJIY2WJ67C2MF5CYKT7UP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to