[SciPy-dev] Some suggestions for scipy_core
pebarrett at gmail.com
Tue Jan 3 08:49:47 CST 2006
On 1/2/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> Francesc Altet wrote:
> > A Dilluns 02 Gener 2006 18:05, Fernando Perez va escriure:
> >>>Maybe unrelated with this discussion, but important anyway because of
> >>>the (supposedly) large userbase that ipython have is the fact that
> >>>ipython will call the __call__() function for the object, if it founds
> >>>it. This makes things worse for the (ipython) user that wants just to
> >>>print the value of the dtype object.
> >>This is a known case of the tension between convenience and correctness,
> >>that ipython tries (not always successfully) to balance.
> >>Note that to aid a little in situations like these, ipython offers some
> > [snip]
> > Yes, I knew this. But the point is that newbie users (and not as
> > newbie, because I find toggling autocall on and off a bit annoying),
> > will be somewhat surprised about the results. This was actually the
> > main reason why I've decided to turn off the __call__() in many
> > objects in PyTables. The other reason is that I replaced __call__() by
> > more meaningful names and the result is far more readable (you know,
> > explicit is better than implicit).
> I've toyed with the idea of making the autocall flag be a 0,1,2 integer,
> today's 'on' would become 2 for 'full', while 1 would be an intermediate
> doing autocall ONLY if there are arguments:
> 1: foo bar -> foo(bar)
> foo -> foo
> 2: foo bar -> foo(bar)
> foo -> foo()
> But I'm out of time for more significant ipython work for now, I'm afraid
> lot of new features went in recently, but now I need to work on other
> Vote if you like it, though, and I'll consider it for the future.
+1 for me too.
Paul Barrett, PhD Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev