[IPython-dev] Recent iplib line_split changes

Dan Milstein danmil at comcast.net
Thu Mar 1 21:08:00 EST 2007


I just pulled down the newest code from svn (written today/ 
yesterday), and my new tests for prefilter promptly blew up.  I'll  
take that as good news (in the, "look, something changed in the  
behavior and the tests complained" department).

Specifically, in changing from rev 2120 to rev 2124, the following  
things now work differently (which should not work differently, I  

  1) Automagic is masking attempts to run valid python

Before, with %automagic on, lines which looked like, say:

 >>> colors = "red green"

Would see the '=' and thus not run the %colors magic command.  As of  
2124, that's broken -- it interprets it as %colors = "red green".    
Ditto for '!<>(),'.

  2) Similarly, ofind() is getting called near !=() when it shouldn't  


 >>> obj.prop = 'thing'

Is calling ofind to lookup prop (with the possible state changes as a  
result).  It wasn't in 2120.

  3) Autocalling is triggered when it can't be syntactically valid

There's a whole set of binary ops which prevent autocalling from  
happening, which are now broken.  E.g.

 >>> len in lst

Is getting transformed to len(in lst), and then bombing.  This was  
getting caught earlier.

I'm pretty sure that these (and other exciting bugs) have to do with  
confusion in the code as to what goes in pre and what goes in iFun as  
a result of the split.  I have ideas on how to clean this up, now  
that the tests seem to be working.


More information about the IPython-dev mailing list