[IPython-user] Parsing issue (maybe).
Andrea Riciputi
ariciputi at pito.com
Thu Jan 12 15:37:37 CST 2006
Yes the objects are callable and yes %autocall is on. So it seems I
have to renounce the %autocall magic functions. It's a pity since I'm
so lazy! ;)
Is there any chance to modify the %autocall in order to cope with a
case like this? I mean, it should be very usefull to keep %autocall
still active for case like objects' methods or functions that don't
need any arguments, such as:
In [1]: my_object.its_method
------> my_object.a_method()
while parentheses should be required to call methods and functions
that require any argument, such as:
In [2]: myfunc(an_arg)
but:
In [3]: my_func an_arg
returns an error. Any comment?
Thanks,
Andrea.
On Jan 12, 2006, at 21:38 , Robert Kern wrote:
> 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.
More information about the IPython-user
mailing list