[IPython-dev] Should we disable autocall by default from now on?

MinRK benjaminrk at gmail.com
Wed Nov 30 03:23:59 EST 2011


I don't find myself using autocall much, but I will probably use it a lot
more if I ever switch
to Python 3 (maybe 2015?), if just for helping me ease out of my `print
foo` habit.

If it causes problems, I certainly wouldn't mind it being off by default.

-MinRK

On Tue, Nov 29, 2011 at 23:07, Fernando Perez <fperez.net at gmail.com> wrote:

> Hi folks,
>
> over the years, we've had a number of bug reports that ultimately boil
> down to ipython doing an extra getattr call on objects at the prompt,
> such as
>
> https://github.com/ipython/ipython/issues/988
> https://github.com/ipython/ipython/issues/851
>
> While this may appear odd, people do have code out there that mutates
> the state of objects on simple getattr calls, and so *any*
> introspection on such objects, no matter how carefully done, mutates
> them.  The last example comes from Traits code, which is famous for
> having complex semantics attached to attribute access.
>
> Since this is a recurring problem, I'm trying to decide whether the
> convenience of autocall being on by default is worth against the
> occasional surprise of situations like these.
>
> Obviously we'd leave the functionality of autocall as-is, and people
> could still enable it if they wanted to.  I'm only talking about
> whether it should be completely off by default.  The reason why
> defaults matter a lot is that the vast majority of users never ever
> change them (I've seen countless long-term users with the wrong colors
> for a light bacgkround, the one default we can't pick for them and
> that leads to unreadable tracebacks, yet people live with it for
> years).  So it's up to us to give people defaults that lead to the
> best experience possible.
>
> I personally had always fallen on the side of saying that autocall is
> a big convenience of ipython, and that code that mutates on simple
> attribute access is special enough that we shouldn't sacrifice that
> convenience for most users to accommodate such a special case.
>
> But I'm not sure anymore if that's the right balance, given the
> recurring nature of these reports (the above are just the two most
> recent ones, I've answered this question in one form or another
> probably 20 times or more over the years).
>
> So I'd like to hear some feedback, as we're getting ready to put 0.12
> out the door soon...
>
> Cheers,
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20111130/07dd9d0d/attachment.html>


More information about the IPython-dev mailing list