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

Mark Voorhies mark.voorhies@ucsf....
Wed Nov 30 13:51:56 CST 2011


On Wednesday, November 30, 2011 10:00:54 am Thomas Kluyver wrote:
<snip>
> I maintain that altering state on attribute access, while it's perfectly
> possible, is almost always a bad idea, for pretty much this reason: you can
> do very useful things by assuming that you're free to inspect attributes.

I tend to agree with you.  On the other hand, it's legal in the language, and
there is no C++-like concept of a const method to block this sort of side effect
(meaning that people will do this sort of thing both deliberately and inadvertently).

Given that lack of autocall fails loudly and multiple attribute access fails silently,
I think that setting the default to "fail loudly" (no autocall) makes sense.

--Mark



More information about the IPython-dev mailing list