[Python-checkins] r70078 - python/trunk/Lib/abc.py

georg.brandl python-checkins at python.org
Sat Feb 28 22:33:10 CET 2009


Author: georg.brandl
Date: Sat Feb 28 22:33:10 2009
New Revision: 70078

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


Modified:
   python/trunk/Lib/abc.py

Modified: python/trunk/Lib/abc.py
==============================================================================
--- python/trunk/Lib/abc.py	(original)
+++ python/trunk/Lib/abc.py	Sat Feb 28 22:33:10 2009
@@ -15,7 +15,8 @@
 
     Usage:
 
-        class C(metaclass=ABCMeta):
+        class C:
+            __metaclass__ = ABCMeta
             @abstractmethod
             def my_abstract_method(self, ...):
                 ...
@@ -35,7 +36,8 @@
 
     Usage:
 
-        class C(metaclass=ABCMeta):
+        class C:
+            __metaclass__ = ABCMeta
             @abstractproperty
             def my_abstract_property(self):
                 ...
@@ -43,7 +45,8 @@
     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)


More information about the Python-checkins mailing list