From: Joon Ro Date: Wed, 28 Nov 2012 17:16:50 +0000 (-0600) Subject: Fixed indentation of a code example X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3206bc59dee28177016ddc036f7b5179b9eeb53d;p=platform%2Fupstream%2Fpython-cython.git Fixed indentation of a code example Fixed a code example which had been indented with 2 spaces. --HG-- extra : transplant_source : %C2%2A8%18%CE%18%87f%BD%E5%0D%5D%90%BA%A0%40%3B%FA%B3%A6 --- diff --git a/docs/src/tutorial/cdef_classes.rst b/docs/src/tutorial/cdef_classes.rst index 5a4aff1..58bfecc 100644 --- a/docs/src/tutorial/cdef_classes.rst +++ b/docs/src/tutorial/cdef_classes.rst @@ -49,15 +49,15 @@ fast for use from Cython and one slower for use from Python. Then:: Using this, we can now change our integration example:: def integrate(Function f, double a, double b, int N): - cdef int i - cdef double s, dx - if f is None: - raise ValueError("f cannot be None") - s = 0 - dx = (b-a)/N - for i in range(N): - s += f.evaluate(a+i*dx) - return s * dx + cdef int i + cdef double s, dx + if f is None: + raise ValueError("f cannot be None") + s = 0 + dx = (b-a)/N + for i in range(N): + s += f.evaluate(a+i*dx) + return s * dx print(integrate(SinOfSquareFunction(), 0, 1, 10000))