bad isinstance() call under python2.7
Created originally on Bitbucket by egrubbs (Edwin Grubbs)
Under python2.7, if you pass something into LXMLWorksheet.append() that is not a list or tuple, you get this error.
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types
In python 2.7, range is not a type, but xrange is. If you pass in a list or a tuple to LXMLWorksheet.append(), isinstance() returns True before it tests whether row is an instance of range.
#!python
def append(self, row):
"""
:param row: iterable containing values to append
:type row: iterable
"""
if (not isinstance(row, (list, tuple, range))
and not isgenerator(row)):
self._invalid_row(row)