Closed
Description
We have some inconsistencies in our api and our documentation. In 0.9.12 we added shortcuts
as an optional argument to __init__()
, and changed the initialization code associated with these shortcuts. This created the following issues:
- the changelog said nothing about disabling the
.shortcuts
attribute. Prior to 0.9.12 you could modify that attribute to change the shortcuts. After 0.9.12, the only way to change the shortcuts is to pass them to__init__()
- What's the point of the
shortcuts
attribute on acmd
object if the caller has to pass it in, and it's read only? Whencmd2
code needs it, can get it from thestatement_parser
, and code that instantiatescmd2.Cmd()
or a subclass thereof already know it because they passed it in. - the docstring for the init method says you should pass shortcuts as a dictionary, and then the initialization code processes those and stores a tuple in the
shortcuts
attribute (which has a property to access it). It seems inconsistent to pass a dictionary and access a tuple. - The DEFAULT_SHORTCUTS variable should really be in
constants.py
, notcmd2.py
Metadata
Metadata
Assignees
Labels
No labels