[Python-3000-checkins] r57277 - python/branches/py3k/Lib/io.py

guido.van.rossum python-3000-checkins at python.org
Wed Aug 22 20:14:10 CEST 2007


Author: guido.van.rossum
Date: Wed Aug 22 20:14:10 2007
New Revision: 57277

Modified:
   python/branches/py3k/Lib/io.py
Log:
Make IOBase (and hence all other classes in io.py) use ABCMeta as its metaclass,
so you can use their class .register() method to register virtual subclasses.


Modified: python/branches/py3k/Lib/io.py
==============================================================================
--- python/branches/py3k/Lib/io.py	(original)
+++ python/branches/py3k/Lib/io.py	Wed Aug 22 20:14:10 2007
@@ -31,6 +31,7 @@
            "BufferedRandom", "TextIOBase", "TextIOWrapper"]
 
 import os
+import abc
 import sys
 import codecs
 import _fileio
@@ -178,7 +179,7 @@
     pass
 
 
-class IOBase:
+class IOBase(metaclass=abc.ABCMeta):
 
     """Base class for all I/O classes.
 


More information about the Python-3000-checkins mailing list