From a5be4a10b5b22f35aa6fccd52e181ceb3d9fda03 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 6 Apr 2022 22:48:33 +0100 Subject: [PATCH] Slight performance improvement for %pythonnondynamic Setting this is much more likely than thisown --- Source/Modules/python.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 915e3f97f..69984ae5e 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -737,10 +737,10 @@ public: tab4, tab4, "if name in (\"this\", \"thisown\"):\n", tab4, tab4, tab4, "set(self, name, value)\n", #else - tab4, tab4, "if name == \"thisown\":\n", - tab4, tab4, tab4, "self.this.own(value)\n", - tab4, tab4, "elif name == \"this\":\n", + tab4, tab4, "if name == \"this\":\n", tab4, tab4, tab4, "set(self, name, value)\n", + tab4, tab4, "elif name == \"thisown\":\n", + tab4, tab4, tab4, "self.this.own(value)\n", #endif tab4, tab4, "elif hasattr(self, name) and isinstance(getattr(type(self), name), property):\n", tab4, tab4, tab4, "set(self, name, value)\n",