asweigart/pygcurse — Issue #4: putchars - Unclear if tuples and lists should be accepted as type for the chars parameter
Author: multimaze
Created: 2012-02-20 14:29:27+00:00
State: open

Regarding putchars():

First you ensure that the type of chars is str:

if type(chars) != str:
raise Exception('Argument 1 must be str, not %s' % (str(type(chars))))

Afterwards you check if chars is of type tuple or list and try to convert chars:

if type(chars) in (list, tuple):
# convert a list/tuple of strings to a single string (this is so that putchars() can work with the return value of getchars())
chars = '\n'.join(chars)

chars will never be of type list or tuple. You will have to change either the type checking in the beginning or remove the conversion part. Both don't make sense together.