Commit 4a789966 authored by ptype's avatar ptype Committed by Stefan Behnel

Minor docs clarification on error return values. (GH-3859)

parent 04988898
...@@ -366,8 +366,8 @@ While this is always the case for :keyword:`def` functions, functions ...@@ -366,8 +366,8 @@ While this is always the case for :keyword:`def` functions, functions
defined as :keyword:`cdef` or :keyword:`cpdef` can return arbitrary C types, defined as :keyword:`cdef` or :keyword:`cpdef` can return arbitrary C types,
which do not have such a well-defined error return value. Thus, if an which do not have such a well-defined error return value. Thus, if an
exception is detected in such a function, a warning message is printed, exception is detected in such a function, a warning message is printed,
the exception is ignored, and the function returns without propagating it the exception is ignored, and the function returns immediately without
to its caller. propagating the exception to its caller.
If you want such a C function to be able to propagate exceptions, you need If you want such a C function to be able to propagate exceptions, you need
to declare an exception return value for it as a contract with the caller. to declare an exception return value for it as a contract with the caller.
...@@ -937,4 +937,3 @@ The expressions in the ``IF`` and ``ELIF`` clauses must be valid compile-time ...@@ -937,4 +937,3 @@ The expressions in the ``IF`` and ``ELIF`` clauses must be valid compile-time
expressions as for the ``DEF`` statement, although they can evaluate to any expressions as for the ``DEF`` statement, although they can evaluate to any
Python value, and the truth of the result is determined in the usual Python Python value, and the truth of the result is determined in the usual Python
way. way.
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