Hacker News new | past | comments | ask | show | jobs | submit login

set = <> is still available

Did this get misformatted? I don't know what you mean.




I believe sciencerobot is saying that "<>" could be used as the empty set literal.


Oh I see, thanks. "s=<>" is less ugly than "s={@}" but, obviously, is inconsistent with "s={1, 2, 3}".


Then fix that: s = <1,2,3>

I think that's better than using the same brace-type for sets and dicts anyway, and it can't be as confusing as () == tuple(), (x) == x, (x,) == tuple([x]).


Yes, that was the idea. I don't think it would be confusing to the parser.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: