Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tcdent
71 days ago
|
parent
|
context
|
favorite
| on:
Python classes aren’t always the best solution
Rule of thumb:
If you find yourself implementing a singleton in Python, you probably wanted a module.
chaz6
70 days ago
[–]
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:
If you find yourself implementing a singleton in Python, you probably wanted a module.