Skip to content

Conversation

@tanloong
Copy link
Contributor

@tanloong tanloong commented Jan 13, 2026

Currently, the only place that explains empty-line repetition is the method-level docstring of Cmd.emptyline(). This is too deep in the page hierarchy and easy to miss. First-time users are surprised when overriding Cmd.default(), as in #143804.

This PR adds an explicit note in the cmdloop() documentation, that is where users conceptually learn how input is processed.

The default() docstring gives no hint that it may be invoked due to empty input. This PR also adds a single cross-reference sentence to default().


📚 Documentation preview 📚: https://cpython-previews--143808.org.readthedocs.build/

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we care about LLMs? we don't want documentation that is overly verbose. Otherwise, we would need to do it for every other methods (not just limited to this specific class). The behavior is documented and I find it enough.

Note that if :meth:emptyline is not overridden, empty input may cause
the previous command to be repeated and passed again to this method.

with "may" it becomes confusing as we don't want will really be happening.

@bedevere-app
Copy link

bedevere-app bot commented Jan 13, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@picnixz
Copy link
Member

picnixz commented Jan 14, 2026

I still don't think it's worth doing this change. For now I'm going to close this PR and will await some opinion from other core devs. Sorry.

@picnixz picnixz closed this Jan 14, 2026
@tanloong
Copy link
Contributor Author

OK. Thanks for taking the time to review this and for explaining your concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes docs Documentation in the Doc dir

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants