[IPython-dev] Auto-calling question

Dan Milstein danmil@comcast....
Mon Feb 26 12:17:25 CST 2007


I'm working my way through the prefilter code and I have a question  
which isn't clear from the docs (to me, at least):

Are the ';', ',', and '/' escapes only supposed to be live if the  
user has %autocall on?  Or are they supposed to be live all the time?

Currently, they're only live if %autocall *is* on, but the code is a  
bit confusing on that front, and I'm not 100% certain that's what's  
intended.

I.e., here's the current behavior:

In [1]: ;len 1 2 3
------> len("1 2 3")
Out[1]: 5

In [2]: %autocall 0
Automatic calling is: OFF

In [3]: ;len 1 2 3
------------------------------------------------------------
    File "<ipython console>", line 1
      ;len 1 2 3
      ^
SyntaxError: invalid syntax


If this *is* the right behavior, I have a small patch to clean up  
some confusing stuff with iplib.InteractiveShell.esc_handlers.

-Dan

p.s. There's a comment that sort of suggests that, at some point,  
those were live all the time.  The 'original' re for line_split looks  
like all escape characters were created equal. (iplib.py l. 495)


More information about the IPython-dev mailing list