[IPython-dev] Question about IPython behaviour

Tzanko Matev tsanko at gmail.com
Tue Jul 26 05:40:21 CDT 2005


Hi all,

The prefilter() method turns strings consisting only of whitespace to
empty strings. This means that in IPython I cannot write the following
code:

In[1]: if 1==1:
   ... ___print 1
   ... ___   
   ... ___print2
   ...

(here I have replaced spaces with underscore). prefilter() will turn the
third line into an empty string and the interpreter will decide that the
block ends there. This differs from the behaviour of the standard
interpreter where the code would run as expected.  So is this a bug or a
feature? I think that empty lines should be allowed in the GUI.

Best,
tzanko




More information about the IPython-dev mailing list