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.
 
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to