[Python-checkins] cpython: Issue #18327: Fix argument order in call to compatible_for_assignment(oldto,

christian.heimes python-checkins at python.org
Sat Jul 20 14:19:56 CEST 2013


http://hg.python.org/cpython/rev/a65856044ad4
changeset:   84725:a65856044ad4
user:        Christian Heimes <christian at cheimes.de>
date:        Sat Jul 20 14:19:46 2013 +0200
summary:
  Issue #18327: Fix argument order in call to compatible_for_assignment(oldto, newto, attr).
The fix only affects the error message of __class__ assignment. CID 983564

files:
  Objects/typeobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3338,7 +3338,7 @@
                      "__class__ assignment: only for heap types");
         return -1;
     }
-    if (compatible_for_assignment(newto, oldto, "__class__")) {
+    if (compatible_for_assignment(oldto, newto, "__class__")) {
         Py_INCREF(newto);
         Py_TYPE(self) = newto;
         Py_DECREF(oldto);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list