[IPython-dev] IPythonInputSplitter.cell_magic_parts and InteractiveShell
Tue Jun 19 23:58:29 CDT 2012
On Tue, Jun 19, 2012 at 9:54 PM, Jason Grout <firstname.lastname@example.org>wrote:
> I'm working on getting the 0.13beta1 to work with Sage. One problem is
> that the InteractiveShell code assumes that the input splitter has a
> .cell_magic_parts attribute (see line 2559 of
> IPython/core/interactiveshell.py). Now, this is not an attribute of
> InputSplitter, but is an attribute of IPythonInputSplitter. Do we have
> to depend on having this attribute, or should InteractiveShell first
> check for the existence of this attribute? In Sage, we have our own
> SageInputSplitter which inherits directly from InputSplitter, and so we
> don't have the .cell_magic_parts attribute.
> In other words, how decoupled do you want InteractiveShell and the
> IPythonInputSplitter subclass of InputSplitter?
I think we can just set InputSplitter.cell_magic_parts = None, so that it's
clearly defined as an unused part of the public input splitter api.
or we use getattr in InteractiveShell, but I think we generally try to
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev