summaryrefslogtreecommitdiff
path: root/stdlib.py
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-03 02:44:20 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-03 02:44:20 +0800
commit8c408791288a2c7b3e62dc8a6133d1402bd4889a (patch)
tree9f15d9900bd5122365e48907a7c0efedc6812dd0 /stdlib.py
parentfb2a230b6fb432773faa726128028fd721eec563 (diff)
fixed input bug
Diffstat (limited to 'stdlib.py')
-rwxr-xr-xstdlib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib.py b/stdlib.py
index f589ea2..7ad8faf 100755
--- a/stdlib.py
+++ b/stdlib.py
@@ -172,16 +172,16 @@ def ainputf(str: str, end='', ccolor=ascii.color.purple):
return input()
def input(*arg):
- import readline
- from builtins import input
- input(*arg)
+ import readline
+ from builtins import input
+ return input(*arg)
def askinput(str: str, inputter=ainputf, ccolor=ascii.color.blue):
return inputter(f"{ccolor}[?] {str}{ascii.color.reset}")
def keepasks(info: str, inputter=ainputf, *inputargs):
tmprespond = ""
- while tmprespond == "" or tmprespond == " " or tmprespond is None:
+ while tmprespond == "" or tmprespond == " " or tmprespond is None or not tmprespond:
tmprespond = inputter(info, *inputargs)
return tmprespond