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

Rule of thumb:

If you find yourself implementing a singleton in Python, you probably wanted a module.



Who needs a singleton when there is @lru_cache(maxsize=1) /s




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: