[IPython-dev] Flat is better than nested

Carlos Córdoba ccordoba12 at gmail.com
Tue May 28 11:41:31 EDT 2013


El 20/05/13 16:00, Fernando Perez escribió:
> On Fri, May 17, 2013 at 12:51 PM, Carlos Córdoba <ccordoba12 at gmail.com> wrote:
>> Ok, thanks for the answer, that makes more sense (although I don't agree
>> with making such changes so far ahead in time).
> One more reason that explains the reasoning behind this: if we really
> want to end up with less nested public APIs (which goes on top of your
> suggestion of better __all__ support), the frontend level didn't
> really add anything.  We can't in frontend/__init__ import anything
> from the subpackages, because a notebook user most certainly won't
> want Qt libraries pulled in, and similarly you guys probably don't
> want tornado to become a dependency for Spyder :)

Well, right now I'm working to create a notebook plugin for Spyder, and 
if everything goes well, I hope to have a demo to show at my Scipy talk :)

> So the frontend/ level was serving one purpose only: informing users
> of the code, by aggregation in the filesystem, that html, terminal and
> qt are our three frontends.

Yes, that was precisely my point (and I think Stéfan's too).

> While there's certainly some value to
> this, there's also a cost in deeper nesting and the above constraint.
> It just seemed like flattening was a better tradeoff in this case,
> since most library users (e.g. sypder) will know anyways that
> IPython's qt directory is really for the qt console, since it's not
> like we ship entire pieces of Qt widgets or anything similar.

Perhaps it was a bit more easier for newcomers to find everything inside 
"frontend" but I think it's wise to avoid too much nesting.

> We realize this represents a small loss of information at the
> filesystem layout level, but it was a worthwhile tradeoff in terms of
> the rest of our package management and API constraints.
>
> I hope this clarifies things.

Yep, thanks for taking the time to explain things more fully.

Cheers,
Carlos

> Cheers,
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev




More information about the IPython-dev mailing list