[IPython-User] doctest_mode continuation change?
Thu Aug 4 15:59:49 CDT 2011
On Thu, Aug 4, 2011 at 1:39 PM, Fernando Perez <firstname.lastname@example.org> wrote:
> On Thu, Aug 4, 2011 at 12:35 PM, Matthew Brett <email@example.com> wrote:
>> Is there some change that I missed that makes that bad to do?
> No, you just found a bug, plain and simple...
> In fact, supposedly now IPython is smart enough to filter all prompts,
> classic or IPython ones, irrespective of %doctest_mode. And we have
> even tests for that :)
> Many cases do work:
> In : >>> x =1
> In : x
> Out: 1
> In : >>> if x:
> ...: ... print 1
> ...: ...
> In :
> But it looks like our logic fail when there are open data structures
> that span multiple lines:
> In : >>> a = [1,2,
> ...: ... 3]
> File "<ipython-input-6-d55d19c4d731>", line 2
> ... 3]
> SyntaxError: invalid syntax
> So lists and dicts fail, but interestingly, tuples work:
> In : >>> a = (1,2,
> ...: 3)
> In : a
> Out: (1, 2, 3)
> In short, it's a bug. Tracking it here:
> Thanks for the report, and sorry for the hassle, because it will make
> doctest handling pretty annoying...
Ah - no - onward and upward - that's what a release is for...
More information about the IPython-User