From d6532eb8ba760c3cbf34a49ea20e90c1d1efa965 2012-09-07 20:53:05 From: Takafumi Arakaki Date: 2012-09-07 20:53:05 Subject: [PATCH] Remove useless iter() call --- diff --git a/IPython/core/history.py b/IPython/core/history.py index 80e8cbe..39b1bc0 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -321,7 +321,7 @@ class HistoryAccessor(Configurable): params += (n,) cur = self._run_sql(sqlform, params, raw=raw, output=output) if n is not None: - cur = iter(reversed(list(cur))) + return reversed(list(cur)) return cur def get_range(self, session, start=1, stop=None, raw=True,output=False):