[IPython-dev] get_ipython() versus _ip
Tue Jun 28 19:15:09 CDT 2011
On 29 June 2011 00:55, Brian Granger <email@example.com> wrote:
> 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.
That makes sense. I'd prefer to have a reference rather than a callable,
Would it make sense to have a public reference called something like ipy,
and a backup copy called something like __ipy? The public name would act
like the built in variables - you can replace it if you want, but it's not
advised. Our own code would use the 'hidden' name, so magic functions etc.
would carry on working even if you did ipy = 2.
Then again, I'm comfortable with the idea of using 'hidden' name like _ip as
the only available name: it's a bit special, because it reaches outside of
the environment you're working in, so it makes sense to mark it as
different. It's also not something I'd expect most end users to be using
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev