[IPython-dev] SVN testers?

Arnd Baecker arnd.baecker at web.de
Fri Jan 20 15:04:56 CST 2006


I just updated from svn - Pasting the following:

class Rectangle:
    def __init__(self, l1=1.0, l2=2.0):
        self.l1 = l1
        self.l2 = l2

    def get_area(self):
        return self.l1 * self.l2

    area = property(get_area)


gives:

In [14]: %autoindent
Automatic indentation is: ON
In [15]: class Rectangle:
   ....:         def __init__(self, l1=1.0, l2=2.0):
   ....:             self.l1 = l1
   ....:         self.l2 = l2
   ....:
In [16]:     def get_area(self):
------------------------------------------------------------
   File "<ipython console>", line 1
     def get_area(self):
     ^
SyntaxError: invalid syntax

In [17]:         return self.l1 * self.l2

Is this to be expected? Somehow I thought that after function or class
definitionsit needs two lines to end the block?

Best, Arnd





More information about the IPython-dev mailing list