1__doc__ = u""" 2 >>> s = Spam(Eggs("ham")) 3 >>> test(s) 4 'ham' 5""" 6 7cdef class Eggs: 8 cdef object ham 9 def __init__(self, ham): 10 self.ham = ham 11 12cdef class Spam: 13 cdef Eggs eggs 14 def __init__(self, eggs): 15 self.eggs = eggs 16 17cdef object tomato(Spam s): 18 food = s.eggs.ham 19 return food 20 21def test(Spam s): 22 return tomato(s) 23