Skip to content

141. Linked List Cycle #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

141. Linked List Cycle #1

wants to merge 2 commits into from

Conversation

katataku
Copy link
Owner

@katataku katataku commented Nov 7, 2024

Copy link

@hayashi-ay hayashi-ay left a comment

Choose a reason for hiding this comment

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

良いと思います。

@katataku
Copy link
Owner Author

katataku commented Nov 7, 2024

後追いですが、他の方の議論を見てis not NONEと書くことを推奨している例を知りました。次からはこっちに寄せようと思います。
tarinaihitori/leetcode#1 (comment)

@konnysh
Copy link

konnysh commented Nov 7, 2024

良いと思います。
一応、currはcurrentの略であってますか? currentという命名に関してdiscord上で検索してみると、いくつか話題に挙がっているのでざっと見てみてもいいと思います。

@katataku
Copy link
Owner Author

katataku commented Nov 7, 2024

良いと思います。 一応、currはcurrentの略であってますか? currentという命名に関してdiscord上で検索してみると、いくつか話題に挙がっているのでざっと見てみてもいいと思います。

ありがとうございます。currentの略として使っていましたので、discordの方見てみます!
https://discord.com/channels/1084280443945353267/1231966485610758196/1236231890038689844


- 代入のスタイルの一貫性がないことに気づいた。「多重代入」か「それぞれ代入する」か。今回は、「それぞれ代入する」に統一する。
- ループ条件のfast.next.nextは確認する意味がないことに気づいたので、削除。
- Noneじゃないことのチェックに、`is not None`のチェックは不要なので削除。
Copy link

Choose a reason for hiding this comment

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

下の2つの URL で Discord を漁ってみてください。
https://google.github.io/styleguide/pyguide.html#2144-decision
https://peps.python.org/pep-0008/#programming-recommendations:~:text=Also%2C%20beware%20of%20writing%20if%20x%20when%20you%20really%20mean%20if%20x%20is%20not%20None
結論はどちらでもいいんですが、相手を説得するときに何をもってよしあしを論じるか、趣味の範囲だが周りと合わせるという態度、が大事だと思います。

Copy link
Owner Author

Choose a reason for hiding this comment

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

ありがとうございます!確認します。

Copy link

Choose a reason for hiding this comment

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

ある種の「他者の発見」という話なのだろうと思っています。

自分の外に規範があって、それとの距離をどうするかという話です。

@tarinaihitori
Copy link

変数名中の英単語は、原則省略しない書き方のほうが認知不可が低くなるのかなと思いました。
それ以外はいいと思います。

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.

5 participants