Author: reinhard
Date: 2006-06-13 15:04:03 -0500 (Tue, 13 Jun 2006)
New Revision: 8492

Modified:
   trunk/gnue-common/src/definitions/GParserHelpers.py
Log:
Be a little more restrictive about what to copy when assigning an object.


Modified: trunk/gnue-common/src/definitions/GParserHelpers.py
===================================================================
--- trunk/gnue-common/src/definitions/GParserHelpers.py 2006-06-13 14:54:27 UTC 
(rev 8491)
+++ trunk/gnue-common/src/definitions/GParserHelpers.py 2006-06-13 20:04:03 UTC 
(rev 8492)
@@ -139,6 +139,13 @@
     for (name, value) in source.__dict__.items ():
       if name in ['_ParserObj__parent', '_children']:
         continue
+      # Do not copy "magic" attributes, they are reserved for Python
+      if name.endswith('__'):
+        continue
+      # Do not copy the list of phaseInit method pointers, they point to the
+      # methods of the source object!
+      if name == '_inits':
+        continue
 
       self.__dict__ [name] = value
 



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to