Home / Questions / Other Python में retry logic के लिए simple loop pattern क्या है? — error आने पर developer क्या करे? Other 0 Views Verified Python में retry logic के लिए simple loop pattern क्या है? — error आने पर developer क्या करे? #python #sqlite #sql #backend #automation #developer Sarkari Result QA Bank Editorially reviewed exam information Share
Verified while True with no exit while True with no exit Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified Correct Answer for attempt in range(3): try: call() break except Exception: if attempt == 2: raise for attempt in range(3): try: call() break except Exception: if attempt == 2: raise Additional Explanation Bounded retries infinite retry loop से safer हैं। पहले traceback की exact line और input value check करें।
Verified retry forever without limit retry forever without limit Additional Explanation यह विकल्प सही समाधान नहीं है।