Permalink
Browse files

Added comment explaining nonobvious self.__dict__ assignment in djang…

…o.conf.__init__.py

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 88ca662 commit 268462d686959d8219c1a828ee6850293d45ab67 @adrianholovaty adrianholovaty committed May 17, 2006
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/conf/__init__.py
View
2 django/conf/__init__.py
@@ -33,6 +33,8 @@ def __getattr__(self, name):
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)

0 comments on commit 268462d

Please sign in to comment.