Skip to content

929. Unique Email Addresses#16

Open
xbam326 wants to merge 3 commits into
mainfrom
929
Open

929. Unique Email Addresses#16
xbam326 wants to merge 3 commits into
mainfrom
929

Conversation

@xbam326
Copy link
Copy Markdown
Owner

@xbam326 xbam326 commented Jan 15, 2026

Comment on lines +29 to +30
- `あくまで個人的な感覚ですが、 try except は重そうという印象があります。実際にどの程度重いかは実装してみないと何とも言えません。個人的には、エラーコード等で代替するなど、現実的なコストで避けられるのであれば避けたいです。この辺りは所属するチームの平均的な書き方に合わせることをお勧めいたします。`
- try-exceptは重そうという感覚を持っておく
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pythonの場合、例外が発生しなければオーバーヘッドはほぼ無し、発生したらスタックトレースを収集するので結構遅くなるそうです。

Comment on lines +15 to +16
if len(split_result) != 2:
raise ValueError('Email must have one "@".')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

入力データにひとつでも仕様外のものがあると、全体の処理が止まってしまいます。これが実務上いいかどうかの考察があると良いでしょう。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants