Commit 6d343f58 authored by Yury V. Zaytsev's avatar Yury V. Zaytsev

Fix broken code samples (indent, spaces, failing doctest)

parent 6436c7d2
...@@ -135,7 +135,7 @@ Attributes in cdef classes behave differently from attributes in regular classes ...@@ -135,7 +135,7 @@ Attributes in cdef classes behave differently from attributes in regular classes
# Available in Python-space: # Available in Python-space:
property period: property period:
def __get__(self): def __get__(self):
return 1.0 / self. freq return 1.0 / self.freq
def __set__(self, value): def __set__(self, value):
self. freq = 1.0 / value self.freq = 1.0 / value
<...> <...>
...@@ -440,7 +440,7 @@ The following listing shows the complete implementation that uses ...@@ -440,7 +440,7 @@ The following listing shows the complete implementation that uses
raise IndexError("Queue is empty") raise IndexError("Queue is empty")
return value return value
cdef int pop(self) except? -1: cpdef int pop(self) except? -1:
if cqueue.queue_is_empty(self._c_queue): if cqueue.queue_is_empty(self._c_queue):
raise IndexError("Queue is empty") raise IndexError("Queue is empty")
return <int>cqueue.queue_pop_head(self._c_queue) return <int>cqueue.queue_pop_head(self._c_queue)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment