From db8c6e42e3d29d14bb40b915fcb0f973b8ddcf34 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 17 Aug 2021 13:48:57 -0700 Subject: [PATCH] Add TypeError if arg is not a string. --- voussoirkit/pipeable.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/voussoirkit/pipeable.py b/voussoirkit/pipeable.py index b964f4e..52c1394 100644 --- a/voussoirkit/pipeable.py +++ b/voussoirkit/pipeable.py @@ -122,6 +122,9 @@ def input( So, your calling code should not have to make any adjustments -- just call this function however is appropriate for your data sink and enjoy. ''' + if not isinstance(arg, str): + raise TypeError(f'arg should be {str}, not {type(arg)}.') + arg_lower = arg.lower() if arg_lower in INPUT_STRINGS: