From eda120d511bfa8c636bde7450399b09c75b85558 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Sun, 2 Jun 2013 13:07:28 +0400 Subject: [PATCH] Fix error_on_uninitialized condition --- Cython/Compiler/FlowControl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/FlowControl.py b/Cython/Compiler/FlowControl.py index efb25b6..7b2e39a 100644 --- a/Cython/Compiler/FlowControl.py +++ b/Cython/Compiler/FlowControl.py @@ -575,9 +575,9 @@ def check_definitions(flow, compiler_directives): if node.allow_null or entry.from_closure or entry.is_pyclass_attr: pass # Can be uninitialized here elif node.cf_is_null: - if Options.error_on_uninitialized and ( - entry.type.is_pyobject or entry.type.is_unspecified or - entry.error_on_uninitialized): + if entry.error_on_uninitialized or ( + Options.error_on_uninitialized and ( + entry.type.is_pyobject or entry.type.is_unspecified)): messages.error( node.pos, "local variable '%s' referenced before assignment" -- 2.7.4