Commit e6a49ace authored by Federico Stra's avatar Federico Stra Committed by Stefan Behnel

Fix early binding example (#2847)

Fix early binding example.
Closes GH-2848.
parent bd56216a
...@@ -18,5 +18,5 @@ cdef class Rectangle: ...@@ -18,5 +18,5 @@ cdef class Rectangle:
return self._area() return self._area()
def rectArea(x0, y0, x1, y1): def rectArea(x0, y0, x1, y1):
rect = Rectangle(x0, y0, x1, y1) cdef Rectangle rect = Rectangle(x0, y0, x1, y1)
return rect.area() return rect._area()
...@@ -15,5 +15,5 @@ cdef class Rectangle: ...@@ -15,5 +15,5 @@ cdef class Rectangle:
return area return area
def rectArea(x0, y0, x1, y1): def rectArea(x0, y0, x1, y1):
rect = Rectangle(x0, y0, x1, y1) cdef Rectangle rect = Rectangle(x0, y0, x1, y1)
return rect.area() return rect.area()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment