diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2018-06-20 06:27:57 +0200 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2018-06-20 06:27:57 +0200 |
| commit | b24cbfba9ca7ce5d58c02c85ce8ad817862dbe60 (patch) | |
| tree | e502b1c09ff82b70ede2a301814dce5ef7818784 /docs/examples/tutorial/clibraries | |
| parent | 88034bdc661ae1fd7d597344b901c13b6bfac42c (diff) | |
| download | cython-b24cbfba9ca7ce5d58c02c85ce8ad817862dbe60.tar.gz | |
docs: Give a better explanation for changing the extend() method in the C libraries tutorial.
See #2362.
Diffstat (limited to 'docs/examples/tutorial/clibraries')
| -rw-r--r-- | docs/examples/tutorial/clibraries/queue3.pyx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/examples/tutorial/clibraries/queue3.pyx b/docs/examples/tutorial/clibraries/queue3.pyx index 09173af5e..0c9bf019f 100644 --- a/docs/examples/tutorial/clibraries/queue3.pyx +++ b/docs/examples/tutorial/clibraries/queue3.pyx @@ -27,11 +27,12 @@ cdef class Queue: <void*> value):
raise MemoryError()
- # The `cpdef` feature is obviously not available for the `extend()`
+ # The `cpdef` feature is obviously not available for the original "extend()"
# method, as the method signature is incompatible with Python argument
- # types (Python doesn't have pointers). However, we can rename
- # the C-ish `extend()` method to e.g. `extend_ints()`, and write
- # a new `extend()` method instead that accepts an arbitrary Python iterable.
+ # types (Python does not have pointers). However, we can rename
+ # the C-ish "extend()" method to e.g. "extend_ints()", and write
+ # a new "extend()" method that provides a suitable Python interface by
+ # accepting an arbitrary Python iterable.
cpdef extend(self, values):
for value in values:
self.append(value)
|
