From: Raymond Hettinger Date: Sun, 10 Mar 2013 16:49:08 +0000 (-0700) Subject: Classmethod example needs to inherit from object X-Git-Tag: v2.7.4rc1~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ed6f7ead19c81d697e0364ac849bd042b7f1502;p=thirdparty%2FPython%2Fcpython.git Classmethod example needs to inherit from object --- diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 0db96d63943b..f793562803cf 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -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"