diff options
Diffstat (limited to 'docs/examples/userguide/sharing_declarations/restaurant.pyx')
-rw-r--r-- | docs/examples/userguide/sharing_declarations/restaurant.pyx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/examples/userguide/sharing_declarations/restaurant.pyx b/docs/examples/userguide/sharing_declarations/restaurant.pyx index 0c1dbf5c0..f556646dc 100644 --- a/docs/examples/userguide/sharing_declarations/restaurant.pyx +++ b/docs/examples/userguide/sharing_declarations/restaurant.pyx @@ -1,12 +1,12 @@ -from __future__ import print_function
-cimport dishes
-from dishes cimport spamdish
-
-cdef void prepare(spamdish *d):
- d.oz_of_spam = 42
- d.filler = dishes.sausage
-
-def serve():
- cdef spamdish d
- prepare(&d)
- print(f'{d.oz_of_spam} oz spam, filler no. {d.filler}')
+ +cimport dishes +from dishes cimport spamdish + +cdef void prepare(spamdish *d): + d.oz_of_spam = 42 + d.filler = dishes.sausage + +def serve(): + cdef spamdish d + prepare(&d) + print(f'{d.oz_of_spam} oz spam, filler no. {d.filler}') |