From ff0fc24b2885d76be2561aa08efe1d60682c8c27 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 13 Feb 2013 21:08:19 -0800 Subject: [PATCH] Speccial case the unused '_' in warnings. --- Cython/Compiler/FlowControl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/FlowControl.py b/Cython/Compiler/FlowControl.py index 8b3ac3f..22f2269 100644 --- a/Cython/Compiler/FlowControl.py +++ b/Cython/Compiler/FlowControl.py @@ -616,7 +616,8 @@ def check_definitions(flow, compiler_directives): # Unused entries for entry in flow.entries: if (not entry.cf_references and not entry.is_pyclass_attr - and not entry.in_closure): + and not entry.in_closure + and entry.name != '_'): if entry.is_arg: if warn_unused_arg: messages.warning(entry.pos, "Unused argument '%s'" % -- 2.7.4