expressions in blocks don't print their value in the REPL
还没有人认领这个 Issue。
评估
调研方向
在 RustPython REPL 中重现这两个代码片段,并跟踪 for 和 with 块中的表达式是如何求值和显示的。完成标准是:对于循环,REPL 打印 0 到 9;对于 f.write('hello'),REPL 打印 5,与 CPython 示例一致。
由索引模型根据 Issue 内容生成。
描述
Try the following snippets:
for i in range(10):
i
with open('/tmp/file.txt', 'w') as f:
f.write('hello')
In CPython:
>>> for i in range(10):
... i
...
0
1
2
3
4
5
6
7
8
9
>>> with open('/tmp/file.txt', 'w') as f:
... f.write('hello')
...
5
>>>
In RustPython:
>>>>> for i in range(10):
..... i
.....
>>>>> with open('/tmp/file.txt', 'w') as f:
..... f.write('hello')
.....
>>>>>
- 主要语言
- Rust
- 星标
- 22.4k
- 派生
- 1.5k
- 平均合并
- 15 小时 18 分钟
- 30 天内合并 PR
- 172
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustPython/RustPython 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
RustPython/RustPython#8470 · 2 条评论 ·
-
C-bug
难度 2/5 1-3 小时 新手友好度 68/100
RustPython/RustPython#7995 · 5 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
RustPython/RustPython#5577 ·
-
C-bug
难度 3/5 1-2 天 新手友好度 68/100
RustPython/RustPython#8685 · 7 条评论 · 1 个 reaction ·
-
C-compat
RustPython/RustPython#8496 · 1 条评论 · 已指派 1 人 ·
查看 RustPython/RustPython 的全部 Issue
相似的 Issue
-
area: compat bug
难度 2/5 1-3 小时 新手友好度 72/100
-
area: dogs bug priority: P3 silent failure test-code
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 70/100
MystenLabs/sui#28056 · 1 条评论 ·
-
type/bug
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 75/100
Luminous-Dynamics/mycelix#2577 ·