[IPython-dev] History in ipython1
Brian Granger
ellisonbg.net at gmail.com
Tue Jul 22 12:00:32 EDT 2008
Also, I think the history of history is important:
In [1]: a = 10
In [2]: b = 20
In [3]: history
1: a = 10
2: b = 20
3: _ip.magic("history ")
Any departure from this will probably confuse developers and users.
Brian
On Tue, Jul 22, 2008 at 8:36 AM, Barry Wark <barrywark at gmail.com> wrote:
> On Mon, Jul 21, 2008 at 10:47 PM, Gael Varoquaux
> <gael.varoquaux at normalesup.org> wrote:
>> On Mon, Jul 21, 2008 at 06:32:30PM +0300, Ville M. Vainio wrote:
>>> On Mon, Jul 21, 2008 at 7:00 AM, Gael Varoquaux
>>> <gael.varoquaux at normalesup.org> wrote:
>>
>>> > number of past executions. Of course, we can always fallback on our feet
>>> > by checking the length of the history, and resetting the cursor to that,
>>> > but it seems simpler to count from the back. How to people feel about
>>> > that?
>>
>>> It would seem simpler to have 0 as the first element, mostly to ensure
>>> that item number 3 will always be the same item (i.e. stable
>>> numbering).
>>
>> Hum, as you load a history, you prepend things to the beginning of the
>> list, so item number 3 will stop being item number 3. I think of history
>> as "item 3 lines ago".
>
> It seems this is a frontend-specific issue. A notebook interface would
> want to think of history counting forwards in time from 0 whereas a
> terminal interface might want to think of history going backwards in
> time from 0.
>
>>
>> Gaƫl
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
>>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
>
More information about the IPython-dev
mailing list