[IPython-dev] History in ipython1

Fernando Perez fperez.net@gmail....
Tue Jul 22 13:24:26 CDT 2008


On Tue, Jul 22, 2008 at 9:00 AM, Brian Granger <ellisonbg.net@gmail.com> wrote:
> 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.

Yes, esp. because there are things like %macro and %edit that use
those numbers, as well as the fact that the In[] list-like object is
also fully accessible and can be used at run-time, and it relies on
the same indexing mode:

In [1]: x = 1

In [2]: x+=1

In [3]: print x
2

In [4]: exec In[2:4]
3

In [6]: exec In[2:4]
4

In [7]: exec In[2:4]
5


Cheers,

f


More information about the IPython-dev mailing list