
Jan. 16, 2022
2:18 a.m.
On Sun, Jan 16, 2022 at 7:35 PM Steven D'Aprano <steve@pearwood.info> 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