News for hackers. Stuff that matters.
Re:Show HN: Refurb – A tool for refurbishing and modernizing... by cmcconomy on Wednesday September 28, 2022 @10:29AM (#33008388)
right, python caches ints from -5 to 256 as singletons, so id(x) for those numbers is constant.

whereas each time you run id() on a number outside that range you will get a different id as a new object is instantiated

Re:Show HN: Refurb – A tool for refurbishing and modernizing... by kevincox on Wednesday September 28, 2022 @10:32AM (#33008431)
I don't think this is related. `set()` uses `hash(x)` it doesn't care what `id(x)` is. The example I provided works equally well with small numbers and large numbers.