Code Style - not really good list manipulation example - needs explanation
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
writing/style.html の Code Style 章を開き、“Short Ways to Manipulate Lists” セクションを読んでください。2 つのリスト例を比較し、in-place で変更する場合と新しいリストを作成する場合の挙動の違いが明確になるよう、周囲の説明を更新してください。各例が元のリストを変更するのはいつなのかを読者が理解できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
In the Code Style chapter examples - Short Ways to Manipulate Lists there is an example "Add three to all list members."
"bad"
for i in range(len(a)):
a[i] += 3
"good"
a = [i + 3 for i in a]
Unfortunately the "bad" and "good" examples do a different things:
- "bad" modifies the original list in place
- "good" creates a new modified list and does not change the original object - not exactly "Add three to all list members."
Although the "good" code looks cleaner the result could be unwanted for example in case of huge lists or required side-effect of modifying the original list. The code at least needs an explanation.
- 主要言語
- Batchfile
- スター
- 29.8k
- フォーク
- 5.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
realpython/python-guide のほかの issue
-
Page 404 error オープン
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
realpython/python-guide#1104 · コメント 2 件 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
realpython/python-guide#327 ·
-
PyZMQ improvements オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
realpython/python-guide#326 · コメント 5 件 ·
-
@alex オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
realpython/python-guide#1194 ·
-
Development Team SAP オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
realpython/python-guide#1192 ·
realpython/python-guide の issue をすべて見る
似ている issue
-
area:dictation documentation P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
uttrflow/uttrflow-swift#1180 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
falcosecurity/falco-website#1601 ·
-
specification
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
WICG/webmonetization#729 ·