From ed54cc904c4f85eaf1ceb18278c02049784218de Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Fri, 19 May 2017 17:16:08 +0200 Subject: [PATCH] Fix E731: do not assign a lambda expression https://www.python.org/dev/peps/pep-0008/#programming-recommendations --- Source/Modules/python.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 2248ba920..40a2d0f40 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -5033,7 +5033,7 @@ public: Printv(f_shadow, tab4, "__swig_destroy__ = ", module, ".", Swig_name_destroy(NSPACE_TODO, symname), "\n", NIL); if (!have_pythonprepend(n) && !have_pythonappend(n)) { if (proxydel) { - Printv(f_shadow, tab4, "__del__ = lambda self: None\n", NIL); + Printv(f_shadow, tab4, "def __del__(self):\n", tab8, "return None\n", NIL); } return SWIG_OK; }