- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
ID: python-best-practices/raising-not-implemented
言語: Python
重大度: 警告
カテゴリー: ベストプラクティス
コードは NotImplemented
を発生させず、代わりに NotImplementedError
を使うべきです。NotImplemented
はドキュメントにあるように値であり、例外ではありません。適切な例外は NotImplementedError です
a = 1
b = 2
raise NotImplemented # 代わりに NotImplementedError を使用します
c = 3
a = 1
b = 2
raise NotImplementedError
c = 3