]> granicus.if.org Git - python/commitdiff
Merged revisions 70078 via svnmerge from
authorGeorg Brandl <georg@python.org>
Sat, 28 Feb 2009 21:35:59 +0000 (21:35 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 28 Feb 2009 21:35:59 +0000 (21:35 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70078 | georg.brandl | 2009-02-28 22:33:10 +0100 (Sa, 28 Feb 2009) | 2 lines

  Fix 3k-style metaclass syntax in docstrings.
........

Lib/abc.py

index 618a32cc7549612a0fdf051facd95c96aa32ddfe..fb61f446a8fdf18dc742828edf72ca9a86c85436 100644 (file)
@@ -15,7 +15,8 @@ def abstractmethod(funcobj):
 
     Usage:
 
-        class C(metaclass=ABCMeta):
+        class C:
+            __metaclass__ = ABCMeta
             @abstractmethod
             def my_abstract_method(self, ...):
                 ...
@@ -35,7 +36,8 @@ class abstractproperty(property):
 
     Usage:
 
-        class C(metaclass=ABCMeta):
+        class C:
+            __metaclass__ = ABCMeta
             @abstractproperty
             def my_abstract_property(self):
                 ...
@@ -43,7 +45,8 @@ class abstractproperty(property):
     This defines a read-only property; you can also define a read-write
     abstract property using the 'long' form of property declaration:
 
-        class C(metaclass=ABCMeta):
+        class C:
+            __metaclass__ = ABCMeta
             def getx(self): ...
             def setx(self, value): ...
             x = abstractproperty(getx, setx)