diff --git a/IPython/core/history.py b/IPython/core/history.py index 124dc86..7a8be08 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -21,7 +21,6 @@ import sys # Our own packages import IPython.utils.io -from IPython.core.inputlist import InputList from IPython.utils.pickleshare import PickleShareDB from IPython.utils.io import ask_yes_no from IPython.utils.warn import warn @@ -37,9 +36,9 @@ class HistoryManager(object): # An instance of the IPython shell we are attached to shell = None - # An InputList instance to hold processed history + # A list to hold processed history input_hist_parsed = None - # An InputList instance to hold raw history (as typed by user) + # A list to hold raw history (as typed by user) input_hist_raw = None # A list of directories visited during session dir_hist = None @@ -229,7 +228,7 @@ class HistoryManager(object): def sync_inputs(self): """Ensure raw and translated histories have same length.""" if len(self.input_hist_parsed) != len (self.input_hist_raw): - self.input_hist_raw = InputList(self.input_hist_parsed) + self.input_hist_raw[:] = self.input_hist_parsed def reset(self): """Clear all histories managed by this object.""" diff --git a/IPython/core/inputlist.py b/IPython/core/inputlist.py deleted file mode 100644 index 1e2a3e8..0000000 --- a/IPython/core/inputlist.py +++ /dev/null @@ -1,14 +0,0 @@ -class InputList(list): - """Class to store user input. - - It's basically a list, but slices return a string instead of a list, thus - allowing things like (assuming 'In' is an instance): - - exec In[4:7] - - or - - exec In[5:9] + In[14] + In[21:25]""" - - def __getslice__(self,i,j): - return ''.join(list.__getslice__(self,i,j)) diff --git a/IPython/frontend/terminal/interactiveshell.py b/IPython/frontend/terminal/interactiveshell.py index cd176ec..671f82b 100644 --- a/IPython/frontend/terminal/interactiveshell.py +++ b/IPython/frontend/terminal/interactiveshell.py @@ -23,7 +23,6 @@ import sys from IPython.core.error import TryNext from IPython.core.usage import interactive_usage, default_banner -from IPython.core.inputlist import InputList from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC from IPython.lib.inputhook import enable_gui from IPython.lib.pylabtools import pylab_activate