diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-16 17:38:05 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-16 17:38:05 -0400 |
commit | 6b388ede0d1cc77a587164010cd0c47aa6ec7052 (patch) | |
tree | c0ca71c520f6451d1f12666be8790ba3387a6ed9 /cmd2/parsing.py | |
parent | 8cf0b30af678717160a6c53cc7c0c84aa007c42f (diff) | |
download | cmd2-git-6b388ede0d1cc77a587164010cd0c47aa6ec7052.tar.gz |
Aliases are now stored within the StatementParser instance
Also:
- Added read-only aliases property to cmd2.Cmd to get aliases from the StatementParser
- Added a setter for the allow_redirection property in cmd2.Cmd
- Made some initialization code more self-documenting
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r-- | cmd2/parsing.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py index 380c9261..cd81f250 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -295,15 +295,15 @@ class StatementParser: else: self.terminators = tuple(terminators) if multiline_commands is None: - self.multiline_commands = () + self.multiline_commands = tuple() else: self.multiline_commands = tuple(multiline_commands) if aliases is None: - self.aliases = {} + self.aliases = dict() else: self.aliases = aliases if shortcuts is None: - self.shortcuts = () + self.shortcuts = tuple() else: self.shortcuts = tuple(shortcuts) |