thirdparty/google_appengine/google/appengine/ext/db/djangoforms.py
changeset 2413 d0b7dac5325c
parent 828 f5fd65cc3bf3
--- a/thirdparty/google_appengine/google/appengine/ext/db/djangoforms.py	Mon Jun 08 22:34:05 2009 +0200
+++ b/thirdparty/google_appengine/google/appengine/ext/db/djangoforms.py	Fri Jun 19 16:13:32 2009 +0200
@@ -105,8 +105,9 @@
 def monkey_patch(name, bases, namespace):
   """A 'metaclass' for adding new methods to an existing class.
 
-  In this version, existing methods can't be overridden; this is by
-  design, to avoid accidents.
+  This shouldn't be used to override existing methods.  However,
+  because loading this module (like loading any module) should be
+  idempotent, we don't assert that.
 
   Usage example:
 
@@ -131,7 +132,6 @@
   base = bases[0]
   for name, value in namespace.iteritems():
     if name not in ('__metaclass__', '__module__'):
-      assert name not in base.__dict__, "Won't override attribute %r" % (name,)
       setattr(base, name, value)
   return base