From 6b388ede0d1cc77a587164010cd0c47aa6ec7052 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sat, 16 Mar 2019 17:38:05 -0400 Subject: 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 --- cmd2/parsing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd2/parsing.py') 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) -- cgit v1.2.1