Author: adrian
Date: 2006-05-16 21:02:26 -0500 (Tue, 16 May 2006)
New Revision: 2929

Modified:
   django/trunk/django/conf/__init__.py
Log:
Added comment explaining nonobvious self.__dict__ assignment in 
django.conf.__init__.py

Modified: django/trunk/django/conf/__init__.py
===================================================================
--- django/trunk/django/conf/__init__.py        2006-05-16 23:27:07 UTC (rev 
2928)
+++ django/trunk/django/conf/__init__.py        2006-05-17 02:02:26 UTC (rev 
2929)
@@ -33,6 +33,8 @@
 
     def __setattr__(self, name, value):
         if name == '_target':
+            # Assign directly to self.__dict__, because otherwise we'd call
+            # __setattr__(), which would be an infinite loop.
             self.__dict__['_target'] = value
         else:
             setattr(self._target, name, value)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to