Skip to content

Should we implement hook methods from cmd.Cmd so we can document them? #896

@kotfu

Description

@kotfu

We are not consistent in defining and documenting methods from cmd.Cmd which we use/rely-on, but which perform the same function as they do in our superclass. For example, cmd2.Cmd provides an implementation of the precmd() method from our superclass, which does exactly the same thing as the superclass method. We do not implement postcmd() or preloop() or postloop(), which are no-ops in the superclass, i.e. they are stub methods waiting to be over-ridden.

Providing an implementation of these methods allows us to reference them in our documentation, which is nice.

I don't care whether we do or don't provide an implementation for these methods, but whichever we choose, we ought to do it the same for all four of these hook-type methods.

Any preference?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions