Correct the range(n) memory explanation
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 95/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- markdown, python
调研方向
阅读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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
QuantEcon/lecture-python-programming 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 95/100
QuantEcon/lecture-python-programming#650 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 95/100
QuantEcon/lecture-python-programming#651 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 95/100
QuantEcon/lecture-python-programming#652 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
QuantEcon/lecture-python-programming#642 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
QuantEcon/lecture-python-programming#634 ·
维护者通常 1 天内回复
查看 QuantEcon/lecture-python-programming 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
Yomguithereal/mnemonist#247 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
up-for-grabs/up-for-grabs.net#6330 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
TheOdinProject/curriculum#31490 ·
维护者通常 1 天内回复
-
bug require-triage
难度 2/5 1-3 小时 新手友好度 72/100
expressjs/expressjs.com#2549 · 1 个 reaction ·
维护者通常 1 天内回复
-
Docs: no path for someone who just wants to try Indiekit可能已有人在做 @rmdes 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
getindiekit/indiekit#1028 ·
维护者通常 1 天内回复