Don't bother with 1-element list, just do it right away.

This commit is contained in:
voussoir 2021-05-25 01:45:34 -07:00
parent 4741946eda
commit db60b84ede
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -151,7 +151,8 @@ def input_many(args, *input_args, **input_kwargs):
This saves you from having to write the double for loop yourself.
'''
if isinstance(args, str):
args = [args]
yield from input(args, *input_args, **input_kwargs)
return
for arg in args:
yield from input(arg, *input_args, **input_kwargs)