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

Matthew Brett matthew.brett at gmail.com
Wed Nov 30 23:20:41 EST 2011


Hi,

On Wed, Nov 30, 2011 at 2:56 PM, Thomas Kluyver <takowl at gmail.com> wrote:
> On 30 November 2011 22:40, Brian Granger <ellisonbg at gmail.com> wrote:
>>
>> In her notebook she had a line:
>>
>> plot e1
>>
>> Which worked due to autocall.  But she had absolutely no idea why this
>> worked (isn't it similar to "print 10").  In her mind, IPython=Python.
>>  My options at that point:
>
>
> I think this is a technical issue as much as anything. The terminal shell
> clearly shows the rewritten command, and it is sent as a payload over ZMQ,
> but AFAIK both of our frontends ignore it. With the notebook, I imagine we
> could literally rewrite the cell to "plot(e1)". To my mind, that would
> clearly say "this is the right way to do it, but I knew what you meant." It
> would also work well for the copy and paste learner.
>
> In general, one of the trickiest things for new programmers is "what does
> this cryptic error message mean I need to change?". For the interpreter,
> guessing what the programmer meant is tricky. Here we have the ability to
> guess what the user meant and correct them. Or we can just throw an
> unhelpful SyntaxError.

How about a default of raising a more informative error?

Best,

Matthew



More information about the IPython-dev mailing list