[IPython-user] Parsing issue (maybe).

Fernando Perez Fernando.Perez at colorado.edu
Thu Jan 12 14:56:21 CST 2006


Robert Kern wrote:

>>In [8]: foo & bar
>>------> foo(& bar)
>>------------------------------------------------------------
>>    File "<console>", line 1
>>      foo(& bar)
>>          ^
>>SyntaxError: invalid syntax
> 
> 
> Turn off %autocall. With %autocall on, ipython recognizes the first token as
> referring to a callable (I presume Function's are callable), and so it tries to
> transform the command into a function call. Of course, this doesn't work in this
> case.
> 
> I usually have %autocall off for this reason.

Yes.  Still, I'll fix the autocall parser to recognize all the binary 
operators and keep off this kind of input.  But disabling autocall will do for 
now.

Cheers,

f




More information about the IPython-user mailing list