From 7f20e250b2b4d2c3abc17952bbd975b0323e2f9a Mon Sep 17 00:00:00 2001 From: Alex Riley Date: Sun, 12 Nov 2023 18:54:14 +0000 Subject: [PATCH] Use whitespace for prompt continuation --- README.md | 12 ++++++------ src/urn/shell.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 02704a1..a049fad 100644 --- a/README.md +++ b/README.md @@ -105,8 +105,8 @@ To see the same calculation, but in the case where we draw _with replacement_, w ``` urn> probability draw 2..13 with replacement -... from red=5, blue=7, green=3 -... where red >= 2 and blue <= 5 show plot; + from red=5, blue=7, green=3 + where red >= 2 and blue <= 5 show plot; ┌────────────────────────────────────────────────────────────┐ │ ▖ ▝ ▖ │ │ │ @@ -132,10 +132,10 @@ urn> probability draw 2..13 with replacement Finally, we can use `OR` to specify any number of alternative constraints on our draw. ``` urn> probability draw 1..10 from red=5, blue=7, green=3 -... where red >= 2 and blue <= 3 -... or blue > 0 and green > 1 -... or blue = 2 red >= 2 and green <= 2 -... show plot; + where red >= 2 and blue <= 3 + or blue > 0 and green > 1 + or blue = 2 red >= 2 and green <= 2 + show plot; ┌────────────────────────────────────────────────────────────┐ │ ▗ ▝ ▘ ▝│ 1.0 │ │ diff --git a/src/urn/shell.py b/src/urn/shell.py index 5662e32..a96c19e 100644 --- a/src/urn/shell.py +++ b/src/urn/shell.py @@ -9,7 +9,7 @@ EOL = ";" PROMPT = "urn> " -PROMPT_CONTINUATION = "... " +PROMPT_CONTINUATION = " " * len(PROMPT) class UrnShell(cmd.Cmd):