python / python/cpython

Add a tutorial for cmd.Cmd for `emptyline()` and `do_EOF`

未关闭
#144,338 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

docs triaged
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

Documentation

This is w.r.t the issue #143804

It was pointed out it is not a bug (agreed) but we can improve the documentation of this module
since it is now not very clear that

  • One has to over-ride "emptyline" so that the last line is not repeated
  • One has to over-ride do_EOF to quit cleanly

A tutorial on this in the documentation would be helpful as right now these are at the level of method level documentation and quite unclear at the usage level.

Linked PRs
  • gh-145292

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先阅读 cmd.Cmd 文档和 issue #143804,以了解现有的方法级说明以及报告中的困惑。添加一个使用级教程,介绍 emptyline() 和 do_EOF,包括预期行为和干净退出,然后验证文档是否清楚地解释了这两个重写方法。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
documentation
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。