Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great point. I do agree that those who use sets heavily should probably know about frozenset. :)

I've never very rarely seen these used in production code though. I'm also not as strongly biased toward them because set objects in my own code are often pretty short-lived so their mutability rarely matters.



I found myself using them more and more often as I started to adopt type annotations.

As you do that, you start to realize that you don't need a MutableMapping. Just a Mapping will do, much less a Dict. Same with Set.


Troy, if you are reading this: please lower your output a bit. I like your stuff a lot but I had to start filtering out your emails because they were relentless.




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

Search: