News for hackers. Stuff that matters.
Re:Performance Analysis of Python's Dict() and {} by masklinn on Monday January 22, 2024 @03:47PM (#39095215)
Except `{}` is never an empty set.
Re:Performance Analysis of Python's Dict() and {} by colpabar on Monday January 22, 2024 @03:58PM (#39095346)
> x = set()

> x

set()

Well now I know! However I still think the shared usage of curly braces for dicts and sets could be somewhat confusing.

> x = {1, 2, 3}

> x

{1, 2, 3}

(But maybe no one should listen to me because I don't know how to do code blocks on HN.)

Re:Performance Analysis of Python's Dict() and {} by tczMUFlmoNk on Monday January 22, 2024 @04:56PM (#39096051)
Indent by four spaces. :-)