エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Pythonでリトライ処理を簡単に追加できる「tenacity」を使ってみる | DevelopersIO
import random from tenacity import retry @retry def random_error(): num = random.randint(0, 10) i... import random from tenacity import retry @retry def random_error(): num = random.randint(0, 10) if num > 4: print(f"Error: num={num}") raise Exception("Error!") else: return f"Success: num={num}" print(random_error()) # => # Error: num=9 # Success: num=1













2024/05/02 リンク