AI Features

Naive Retrying

Learn about naive retrying in Python.

There’s a common pattern that can be seen across all sorts of programs that can be summarized with the word “retrying”. It is directly tied to the idea of trying something again that returned an error or raised an exception when it was not expected.

Basic retrying pattern

The basic pattern that most developers implement looks like what is shown in the following ...