Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
d17d4e96
Commit
d17d4e96
authored
Jun 20, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put a dummy processing in the function rather than asking the user for decision.
parent
9e55199c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
docs/examples/tutorial/string/return_memview.pyx
docs/examples/tutorial/string/return_memview.pyx
+5
-3
No files found.
docs/examples/tutorial/string/return_memview.pyx
View file @
d17d4e96
def
process_byte_data
(
unsigned
char
[:]
data
,
bint
return_all
):
# ... process the data
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
:
35
])
return
bytes
(
data
[
5
:
7
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment