Remove trailing whitespace.
[cython.git] / tests / broken / r_extcmethod.pyx
1 cdef class SpamDish:
2     cdef int spam
3
4     cdef void describe(self):
5         print "This dish contains", self.spam, "tons of spam."
6
7
8 cdef class FancySpamDish(SpamDish):
9     cdef int lettuce
10
11     cdef void describe(self):
12         print "This dish contains", self.spam, "tons of spam",
13         print "and", self.lettuce, "milligrams of lettuce."
14
15
16 cdef void describe_dish(SpamDish d):
17     d.describe()
18
19 def test():
20     cdef SpamDish s
21     cdef FancySpamDish ss
22     s = SpamDish()
23     s.spam = 42
24     ss = FancySpamDish()
25     ss.spam = 88
26     ss.lettuce = 5
27     describe_dish(s)
28     describe_dish(ss)