[IPython-dev] wildcard feature

Fernando Perez Fernando.Perez at colorado.edu
Mon Sep 12 03:01:29 EDT 2005


Ville Vainio wrote:
> On 9/11/05, Jörgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> 
> 
>>I have now worked on Fernando's suggestions and I have a working (with
>>my limited testing) implementation. I have made a quick hack to insert
>>the functionality to work with ?. This should probably be modified to
>>conform to the IPython general design philosophy.
> 
> 
> Is it really necessary to use the "?" character, instead of a magic
> function? "?" is a bit too "special" IMO, when a more generic solution
> would suffice. I recognize the value of the similarity with matlab,
> but perhaps we shouldn't add too many special prefixes...

Well, the way I see it, ? is already there for finding information about 
objects.  This seems like a quite natural extension: when you don't know the 
actual name of an object, this can help you find it.  For example, this 
(mockup) use looks very natural to me:

 > plot*?

['plot','plotfoo','plotbar']

 > plotfoo?

... plotfoo plots foos very nicely...

While the above case is probably best handled with plain TAB completion, for 
cases where the unknown part is at the beginning of a name, TAB won't help you.

So it doesn't feel to me like introducing anything new (? is already a special 
prefix, it has been since ipython was born).  Rather, it's an extension to the 
functionality of '?' which seems fairly natural to me.

Cheers,

f

ps - Ville, what came out of your win32 experiments?  I'd forgotten to ping 
you again on that, sorry...




More information about the IPython-dev mailing list