<div class="gmail_quote">On 29 June 2011 00:55, Brian Granger <span dir="ltr"><<a href="mailto:ellisonbg@gmail.com">ellisonbg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div id=":y8">The name get_ipython is 1) less likely to run into collisions than<br>
generic things like _ip and 2)<br>
get_ipython suggest that it is a public API, whereas all of the _ and<br>
__ names suggest that<br>
it is a private API.</div></blockquote></div><br>That makes sense. I'd prefer to have a reference rather than a callable, though.<br><br>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.<br>

<br>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 regularly.<br>

<br>Thomas<br>