[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

Błażej Michalik report at bugs.python.org
Sat Jun 30 18:27:59 EDT 2018


Błażej Michalik <assassinking at gmail.com> added the comment:

It was nearly 2 years ago when we needed it, and we avoided the issue by overriding get_names(). I'll have to find the code in which this was used to answer your question.

I guess we could've modified the class definition, however weirdly would that look.

But then again, shouldn't the commands that are runnable from inside .cmdloop() be auto-completable and visible in 'help'? IMHO it does make some intuitive sense, or at least it seems less surprising.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28657>
_______________________________________


More information about the Python-bugs-list mailing list