On Sun, Jan 16, 2022 at 7:35 PM Steven D'Aprano <[email protected]> wrote:
> How does this work for you?
>
> f{1, 2, 3}
>
While it's tempting, it does create an awkward distinction.
f(1, 2, 3) # look up f, call it with parameters
f[1, 2, 3] # look up f, subscript it with paramters
f{1, 2, 3} # construct a frozenset
And that means it's going to be a bug magnet.
Are we able to instead make a sort of vector literal?
<1, 2, 3>
Unfortunately there aren't many symbols available, and Python's kinda
locked into a habit of using just one at each end (rather than, say,
(<1, 2, 3>) or something), so choices are quite limited.
ChrisA
_______________________________________________
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/R2P4XC4DGZLJVYUZ532MASJB4UVS5JWN/
Code of Conduct: http://python.org/psf/codeofconduct/