summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-10-29 13:20:41 +0100
committerStefan Behnel <stefan_ml@behnel.de>2017-10-29 13:20:41 +0100
commitb64b657a515dca14fb559f3024020d3a29ed1333 (patch)
tree5d1dc5f47d2d38d8b8b768dcbcce6ed61654dc71
parentf4887a9707f3c0e77bc34d84f3dddd84d85e843d (diff)
downloadcython-b64b657a515dca14fb559f3024020d3a29ed1333.tar.gz
Add comment.
-rw-r--r--Cython/Compiler/TypeInference.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/TypeInference.py b/Cython/Compiler/TypeInference.py
index 0f018aad7..0466c4b9e 100644
--- a/Cython/Compiler/TypeInference.py
+++ b/Cython/Compiler/TypeInference.py
@@ -427,6 +427,8 @@ class SimpleAssignmentTypeInferer(object):
if rhs_type and rhs_type.is_pyobject:
has_pyobjects = True
types.append(rhs_type)
+ # Ignore None assignments as long as there are concrete Python type assignments.
+ # but include them if None is the only assigned Python object.
if has_none and not has_pyobjects:
types.append(py_object_type)
return types