Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Correct the range(n) memory explanation

未關閉 適合新手
#653 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
95/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
markdown, python
領域
documentation

研究方向

閱讀lectures/python_advanced_features.md,找到介紹range(n)和draws的「迭代器的優勢」部分。修改該說明,指出Python 3中的range(n)是惰性的,不會將所有索引實際產生至記憶體中,而清單推導式會建立大型的draws清單。完成標準是該部分準確區分這兩種記憶體行為,且不修改範例。

由索引模型根據 Issue 內容生成。

描述

In lectures/python_advanced_features.md, the “Advantages of iterators” section says that the list-comprehension example creates two huge lists: range(n) and draws. In Python 3, range(n) is a lazy range object, not a materialized list. The list comprehension creates the large draws list; the range object itself does not allocate a list of all indices.

Please revise the explanation so it accurately distinguishes the memory-efficient range object from the list created by the comprehension.

主要語言
JavaScript
星號
72
分支
33
平均合併
22 分鐘
30 天內合併 PR
3

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

QuantEcon/lecture-python-programming 的其他 Issue

查看 QuantEcon/lecture-python-programming 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。