[IPython-dev] get_ipython() versus _ip

Brian Granger ellisonbg at gmail.com
Tue Jun 28 19:55:46 EDT 2011

The logic was that we want to minimize the things we insert into the
global namespace.
The name get_ipython is 1) less likely to run into collisions than
generic things like _ip and 2)
get_ipython suggest that it is a public API, whereas all of the _ and
__ names suggest that
it is a private API.

I know it is not great, but I like having something that is public but
we want to avoid name
collisions.  I am definitely open to ideas though.


On Tue, Jun 28, 2011 at 1:43 PM, Thomas Kluyver <takowl at gmail.com> wrote:
> Something I've been wondering for a while now: in previous versions, the
> user namespace had a reference to the shell object with a name like _ip. In
> trunk, we've replaced that with a get_ipython() callable, which returns the
> same reference. What was the reasoning behind that? I find that when I want
> to use it, I inevitably end up typing "ip = get_ipython()", both for brevity
> and so I get tab completion.
> Thanks,
> Thomas
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com

More information about the IPython-dev mailing list