Clarify pipeable.input_many docstring.

master
voussoir 2021-08-11 01:01:14 -07:00
parent cdf551f28a
commit 72fdcb2b04
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 3 additions and 1 deletions

View File

@ -147,8 +147,10 @@ def input(
def input_many(args, *input_args, **input_kwargs): def input_many(args, *input_args, **input_kwargs):
''' '''
Given many input arguments, yield the input() results for all of them. Given a list of input arguments, yield the input() results for all of them.
This saves you from having to write the double for loop yourself. This saves you from having to write the double for loop yourself.
This is useful when writing an argparser with nargs='+' where each arg
might be a string or !i or !c.
''' '''
if isinstance(args, str): if isinstance(args, str):
yield from input(args, *input_args, **input_kwargs) yield from input(args, *input_args, **input_kwargs)