Fix TableList repr

pull/2/head
Vinayak Mehta 2018-09-27 04:42:23 +05:30
parent 00b7b2aeba
commit dfb0d4fb4c
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
>>> import camelot
>>> tables = camelot.read_pdf('foo.pdf')
>>> tables
<TableList tables=1>
<TableList n=1>
>>> tables.export('foo.csv', f='csv', compress=True) # json, excel, html
>>> tables[0]
<Table shape=(7, 7)>

View File

@ -438,8 +438,8 @@ class TableList(object):
self._tables = tables
def __repr__(self):
return '<{} tables={}>'.format(
self.__class__.__name__, len(self._tables))
return '<{} n={}>'.format(
self.__class__.__name__, self.n)
def __len__(self):
return len(self._tables)

View File

@ -36,7 +36,7 @@ Release v\ |version|. (:ref:`Installation <install>`)
>>> import camelot
>>> tables = camelot.read_pdf('foo.pdf')
>>> tables
<TableList tables=1>
<TableList n=1>
>>> tables.export('foo.csv', f='csv', compress=True) # json, excel, html
>>> tables[0]
<Table shape=(7, 7)>