
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
今更pytest&pytest-cov - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
今更pytest&pytest-cov - Qiita
import re def sum_up(a: int, b: int) -> int: return a + b def subtract(a: int, b: int) -> int: re... import re def sum_up(a: int, b: int) -> int: return a + b def subtract(a: int, b: int) -> int: return a - b def sum_up_str(a: int | str, b: int | str) -> int: # check if a and b are castable to int if re.match(r"^\d+$", str(a)) is None: raise ValueError("a is not castable to int") if re.match(r"^\d+$", str(b)) is None: raise ValueError("b is not castable to int") if isinstance(a, str): a = int(a)