summaryrefslogtreecommitdiff
path: root/docs/examples/tutorial/string/return_memview.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/tutorial/string/return_memview.pyx')
-rw-r--r--docs/examples/tutorial/string/return_memview.pyx18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/examples/tutorial/string/return_memview.pyx b/docs/examples/tutorial/string/return_memview.pyx
index f6233436a..be9b597a4 100644
--- a/docs/examples/tutorial/string/return_memview.pyx
+++ b/docs/examples/tutorial/string/return_memview.pyx
@@ -1,9 +1,9 @@
-def process_byte_data(unsigned char[:] data):
- # ... process the data, here, dummy processing.
- cdef bint return_all = (data[0] == 108)
-
- if return_all:
- return bytes(data)
- else:
- # example for returning a slice
- return bytes(data[5:7])
+def process_byte_data(unsigned char[:] data):
+ # ... process the data, here, dummy processing.
+ cdef bint return_all = (data[0] == 108)
+
+ if return_all:
+ return bytes(data)
+ else:
+ # example for returning a slice
+ return bytes(data[5:7])