From dfb0d4fb4c022ddbf5c3c20be5d42e05f33dc2b4 Mon Sep 17 00:00:00 2001 From: Vinayak Mehta Date: Thu, 27 Sep 2018 04:42:23 +0530 Subject: [PATCH] Fix TableList repr --- README.md | 2 +- camelot/core.py | 4 ++-- docs/index.rst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f117a49..50bdd72 100644 --- a/README.md +++ b/README.md @@ -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)> diff --git a/camelot/core.py b/camelot/core.py index 0658236..14421f7 100644 --- a/camelot/core.py +++ b/camelot/core.py @@ -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) diff --git a/docs/index.rst b/docs/index.rst index 99a1869..9d63704 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,7 +36,7 @@ Release v\ |version|. (:ref:`Installation `) >>> import camelot >>> tables = camelot.read_pdf('foo.pdf') >>> tables - + >>> tables.export('foo.csv', f='csv', compress=True) # json, excel, html >>> tables[0]