Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 268462d686959d8219c1a828ee6850293d45ab67 1 parent 88ca662
@adrianholovaty adrianholovaty authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.