D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)
ngoldbaum (Nathan Goldbaum)
phabricator at mercurial-scm.org
Sat May 25 07:56:04 EDT 2019
ngoldbaum added inline comments.
INLINE COMMENTS
> martinvonz wrote in help.py:689-695
> I avoid for-else for the same reason, but how about this:
>
> if not any(subtopic in names for names, header, doc in subtopics[name]):
> raise error.UnknownCommand(name)
OK, I agree that's clearer. I used `_` to match `header` and `doc` to make the line a bit shorter and to make it a bit clearer for me to read since those aren't being used.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6441
To: ngoldbaum, #hg-reviewers, martinvonz
Cc: martinvonz, av6, mercurial-devel
More information about the Mercurial-devel
mailing list