[IPython-dev] 0.9 beta, anything left?

Ville M. Vainio vivainio at gmail.com
Thu Aug 14 22:57:15 EDT 2008


On Fri, Aug 15, 2008 at 4:43 AM, Fernando Perez <fperez.net at gmail.com> wrote:

> Let's go with the '=' option, then.  cd can be special that way :)

= won't work, it raises NameError and never gets to %cd (it looks like
python assignment to ipython as well) ;-)

> Otherwise for cd we'd have to implement special parsing logic, since
> normal options handling would break given arbitrary --foo input.  As
> 'import this' says,
>
> Special cases aren't special enough to break the rules.
> and this is a case where I agree with it, here the benefit of a
> special case does not in any way outweigh the cost of breaking a
> pattern.

The "parsing" logic we already have in %cd is quite trivial, so we
don't really have to shoehorn %cd to the option parsing formula, esp.
since cd will never have arguments in the long format.

I'd be inclined to say that we should leave it as --, and change it if
it proves problematic at some point. We could change it to ---, but
that gets kind of heavy, and other characters have special meanings
(to python or readline as we currently use it).

And since "cd -<n>" is already a special case, the cd magic can be
considered terminally broken from the strict option handling point of
view...

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'



More information about the IPython-dev mailing list