diff --git a/SWIG/Source/Modules/python.cxx b/SWIG/Source/Modules/python.cxx index 6a446d5f5..b4b07f87e 100644 --- a/SWIG/Source/Modules/python.cxx +++ b/SWIG/Source/Modules/python.cxx @@ -1475,7 +1475,7 @@ public: } int assignable = is_assignable(n); - if ((shadow) && assignable) { + if ((shadow) && !assignable) { if (!in_class) { Printf(f_shadow_stubs,"%s = %s.%s\n", iname, global_name, iname); }