[IPython-dev] cell magics

Fernando Perez fperez.net at gmail.com
Sat Feb 16 02:44:41 EST 2013


Hey Jason,

On Fri, Feb 15, 2013 at 11:35 PM, Jason Grout
<jason-sage at creativetrax.com> wrote:
> Thanks for the detailed email.  I figured that there was pretty close to
> zero chance IPython would change, if only from backwards compatibility.
>   However, you've gone way beyond just backwards compatibility and
> argued pretty effectively for the current syntax.  In fact, much of what
> you wrote I think would be great in an "overview of magics" document
> somewhere :).

Yup, good point.  We're starting to put effort into our docs, I'll
fish this out of email in a few days (or someone else will beat me to
it).  One thing we have too little of, and which we need, are this
kinds of explanations that describe the design, architecture and
philosophy of the system.

I know due to our lack of docs it may not look like it, but we've
actually thought a LOT about having a coherent internal design at all
levels in IPython.  It may have started as a quick and dirty hack, but
we've done our best to shape it into something with a fair amount of
internal consistency that follows a few simple principles that
actually be stated and explained.  We just need to *actually* state
them :)

> I had been thinking of magics as literally "string decorators" (i.e.,
> functions in the user namespace that take a string as their first
> argument).  I see you think of them and their uses very differently.
> I'm still forming my opinions (and brainstorming ideas), so I appreciate
> the thoughtful answer.

My pleasure.  It was a good exercise, so thanks for the opportunity :)

> Jason
>
> P.S. And for the record, though I come from the Sage community, I don't
> necessarily personally espouse the "import everything" philosophy; I
> think Sage probably went a little overboard there.  I suppose I'm
> somewhat halfway between the kitchen-sink and minimalistic "namespaces
> are a honking great idea" philosophies right now.  I realize you were
> just making general statements about communities and philosophies, of
> course.

Sure, and I know that much of that also stems from a consistent
following of Sage's motto of being a "viable alternative to the M*s".
The M*s all do this, and their users are accustomed (for better or
worse) to such functionality, so for Sage that path is one that is
consistent with its guiding principles.  Not the choice *I* would
make, but I can understand why and how Sage got there.

Cheers,

f



More information about the IPython-dev mailing list