From 99ef06149d7566e5491f11ac584a55f2c57a1e43 Mon Sep 17 00:00:00 2001 From: ARCJ137442 <61109168+ARCJ137442@users.noreply.github.com> Date: Sat, 28 Oct 2023 02:34:36 +0800 Subject: [PATCH] feat: :rewind: Narsese Automatic Analytic Simplification is now off by default --- pynars/ConsolePlus.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pynars/ConsolePlus.py b/pynars/ConsolePlus.py index dfdb735..125ec77 100644 --- a/pynars/ConsolePlus.py +++ b/pynars/ConsolePlus.py @@ -338,10 +338,10 @@ def execution_F(arguments: Iterable[Term], task: Task=None, memory: Memory=None) def toggle_simplify_parse() -> None: '''Toggle the "automatic shorthand parsing" function of the cmd (enabled by default), If so, the Narsese input are automatically parsed in a simplified format''' - global _parse_need_slash - _parse_need_slash = not _parse_need_slash + global _parse_simplification + _parse_simplification = not _parse_simplification print( - f'Narsese automatic analytic simplification {"closed" if _parse_need_slash else "opened"}.') + f'Narsese automatic analytic simplification {"closed" if _parse_simplification else "opened"}.') @cmd_register('help') @@ -680,8 +680,8 @@ async def main(): # Total index and other variables # -_parse_need_slash: bool = False -'Determines whether the last input is a command' +_parse_simplification: bool = False +'Determines whether the "Narsese automatic analytic simplification" enabled' input_history: List[str] = [] 'History of inputs' @@ -787,7 +787,7 @@ def execute_input(inp: str, *other_input: List[str]) -> None: # Narsese parsing has_slash = False # usage of backslashes: Enforce/disable "parse simplification" - if not _parse_need_slash or (has_slash := inp.startswith('\\')): + if _parse_simplification or (has_slash := inp.startswith('\\')): if has_slash: # Remove the slash if there is a backslash inp = inp[1:] inp = special_narsese_parse(inp=inp)