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

This is solveable with extra verbosity.

  # no:
  MAX_FAILS = 3
  MAX_RETRIES = 5

  # yes:
  MAX_API_CONNECTION_RETRIES = 3
  MAX_COMPLEX_GRAPH_SOLVING_RETRIES = 5
Apologies for terrible names, but the point is that you should name the constant different things, so that it's clear what __kinds__ of retries you are capping.


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

Search: