Commit 49099dda authored by Stefan Behnel's avatar Stefan Behnel

make an old test from 'broken' directory usable

parent 846f0ec7
cdef class SpamDish:
cdef int spam
cdef void describe(self):
print "This dish contains", self.spam, "tons of spam."
cdef class FancySpamDish(SpamDish):
cdef int lettuce
cdef void describe(self):
print "This dish contains", self.spam, "tons of spam",
print "and", self.lettuce, "milligrams of lettuce."
cdef void describe_dish(SpamDish d):
d.describe()
def test():
cdef SpamDish s
cdef FancySpamDish ss
s = SpamDish()
s.spam = 42
ss = FancySpamDish()
ss.spam = 88
ss.lettuce = 5
describe_dish(s)
describe_dish(ss)
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