On Fri, Jul 26, 2013 at 4:55 PM, Matthias Bussonnier <
notifications@github.com> wrote:

> In IPython/core/completer.py:
>
> > +
> > +    %matplotlib -> matplotlib%
> > +
> > +    [The choice of the final % is arbitrary.]
> > +
> > +    Since "matplotlib" < "matplotlib%" as strings,
> > +    "timeit" will appear before the magic "%timeit" in the ordering
> > +
> > +    For consistency, move "%%" to the end, so cell magics appear *after*
> > +    line magics with the same name.
> > +
> > +    """
> > +
> > +    # Move all % to end of the *key* (don't change the actual text, of course)
> > +
> > +    pattern = re.compile("%+")  # find %
>
> Maybe not compile in the function but outside to do it only once.
>

Good point. Where should it go?


>  —
> Reply to this email directly or view it on GitHub<https://github.com/ipython/ipython/pull/3801/files#r5435796>
> .
>



-- 
Dr. David P. Sanders

Profesor Titular "A" / Associate Professor
Departamento de Física, Facultad de Ciencias
Universidad Nacional Autónoma de México (UNAM)

dpsanders@gmail.com
http://sistemas.fciencias.unam.mx/~dsanders

Cubículo / office: #414, 4o. piso del Depto. de Física

Tel.: +52 55 5622 4965