Ch 30 / 20.python.list-reference.ipynb — Python side complete, C++ bridge missing
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 領域
- content, documentation
調査の方向性
30.pointers-and-memory-management/20.python.list-reference.ipynb を開き、既存の Python の例を実行します。セル 12 と 17 の実行前予測プロンプト、およびセル 24 の演習に重点を置いてください。セル 22 の周辺に C++ ブリッジを追加し、要求された raw-pointer と vector の例、類推表、copy の用語、および最後の予測演習を含めてください。既存の演習の前に、ノートブックが Python での観察結果を両方の C++ のケースに結び付けていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The notebook 30.pointers-and-memory-management/20.python.list-reference.ipynb sets up an excellent pedagogical hook: the Python [one_row] * n_row aliasing pattern (where one inner list gets referenced 10 times) is exactly the right entry point for introducing reference semantics in a language students already know. The predict-before-run prompts in cells 12 and 17 ("What do you think happened?" / "Why the result is different this time?") are pedagogically strong.
However, the notebook stops at the exercise prompt (cell 24):
"Write two C/C++ programs that respectively regenerate python results above."
without providing the C++ side of the bridge. Students are left to make the cross-language connection on their own — exactly the connection the notebook's title (python.list-reference) and structure promise to deliver.
Suggested addition (~3-4 hours of work)
Add a new section after the Python observations (around cell 22, before the exercise) that:
-
Writes the equivalent C++ programs — one with raw
int**showing the aliasing bug parallel; one withstd::vector<std::vector<double>>showing the safe modern equivalent. -
Translates the
is/id()mental model to C++ —Python a is bcorresponds toC++ &a == &bfor the aliasing case. Show this withcout << &matrix[0] << " == " << &matrix[1] << '\n';parallel. -
Names the analogy explicitly with a side-by-side table:
Python C/C++ What it means b = a(list)int *b = a;Both point to same memory b = a.copy()std::vector<int> b = a;Deep copy a is b&a[0] == &b[0]Same memory? -
Connects to "shallow vs deep copy" as a named concept that bridges both languages.
-
Closes with a "predict before run" mission parallel to the Python exercises.
Why this matters
This notebook contains the single most pedagogically unique idea in the repo — using Python as the anchor for C++ pointer semantics. As-is, it's a sketch of the bridge rather than the bridge itself. Completing it would make this the most powerful piece of the Ch 30 supplement-for-freshmen role discussed in 2026-05-20 session evaluation.
Context
Tagged freshman-audience because completing this bridge is specifically what makes the chapter useful for post-Python freshmen (rather than the graduate audience the chapter was originally written for).
- 主要言語
- Jupyter Notebook
- スター
- 3
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kangwonlee/2018pycpp のほかの issue
-
Pointer arithmetic demo accesses out-of-bounds memory without warning (Ch 30 / 00.pointers.ipynb)オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
kangwonlee/2018pycpp#75 ·
-
Intel assemblyオープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
kangwonlee/2018pycpp#65 ·
-
CI in tutorial gitオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
kangwonlee/2018pycpp#61 ·
-
Rust studyオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
kangwonlee/2018pycpp#56 · コメント 1 件 ·
-
question
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
kangwonlee/2018pycpp#52 ·
kangwonlee/2018pycpp の issue をすべて見る
似ている issue
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
githubnext/gh-aw-workshop#3897 ·
メンテナーはふだん 2 日以内に返信
-
correction metadata
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
acl-org/acl-anthology#10103 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
resources
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
railmapgen/rmg-palette#2445 ·
メンテナーはふだん 1 日以内に返信