]> granicus.if.org Git - python/commitdiff
Classmethod example needs to inherit from object
authorRaymond Hettinger <python@rcn.com>
Sun, 10 Mar 2013 16:49:08 +0000 (09:49 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 10 Mar 2013 16:49:08 +0000 (09:49 -0700)
Doc/howto/descriptor.rst

index 0db96d63943b593cce823fd48c6bebf9f2293246..f793562803cf2c7d66423c8ed1801617c25eff46 100644 (file)
@@ -409,7 +409,7 @@ is to create alternate class constructors.  In Python 2.3, the classmethod
 :func:`dict.fromkeys` creates a new dictionary from a list of keys.  The pure
 Python equivalent is::
 
-    class Dict:
+    class Dict(object):
         . . .
         def fromkeys(klass, iterable, value=None):
             "Emulate dict_fromkeys() in Objects/dictobject.c"