Clarify benefits of factory methods in Module 2
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 55/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- jupyter-notebook, python
調査の方向性
Module 2 の static methods セクションから始め、factory methods の現在の説明を見直してください。要求された用語、根拠、datetime と polars の例を追加してください。セクションでこのパターンをいつ、なぜ使うのかを説明し、一覧にある例を含めれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The static methods section in Module 2 shows how to create factory methods but could better explain when and why to use them.
Current state
The notes mention it's "less cumbersome" to create instances, but the pedagogical value could be stronger.
Suggested improvements
-
Name the pattern - Use the term "factory method" or "alternative constructor" so students can recognize and search for it
-
Explain the "why" - Python doesn't support multiple
__init__signatures, so factory methods provide multiple construction paths with semantic clarity -
Add stdlib examples from datetime:
datetime.fromtimestamp()datetime.fromisoformat()date.fromordinal()
-
Add examples from polars:
pl.read_csv(),pl.read_parquet(),pl.read_json()(module-level factories)DataFrame.to_dict()→pl.from_dict()round-trippl.from_numpy(),pl.from_pandas()
These examples show the pattern is pervasive in well-designed Python APIs.
- 主要言語
- Jupyter Notebook
- スター
- 8
- フォーク
- 1
- 平均マージ
- 4分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DHI/python-package-development のほかの issue
-
難易度 2/5 1〜2日 初心者へのやさしさ 88/100
-
難易度 2/5 1〜2日 初心者へのやさしさ 72/100
DHI/python-package-development#37 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
DHI/python-package-development の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agilepathway/label-checker#640 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
BasedHardware/omi#15662 · コメント 1 件 ·
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
amponce/archive-movie-browser#167 ·
-
user-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Kong/developer.konghq.com#7316 ·