diff options
author | Guido van Rossum <guido@python.org> | 2007-08-22 18:14:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-22 18:14:10 (GMT) |
commit | b7f136e73eda63c4bef46d2a749faf3692cddc5c (patch) | |
tree | a8918680bc0a622424b0abc49035e6a0f56e4a99 | |
parent | bfc672b16921fd90660edec8fdcdbbedf01aa2d9 (diff) | |
download | cpython-b7f136e73eda63c4bef46d2a749faf3692cddc5c.zip cpython-b7f136e73eda63c4bef46d2a749faf3692cddc5c.tar.gz cpython-b7f136e73eda63c4bef46d2a749faf3692cddc5c.tar.bz2 |
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.
-rw-r--r-- | Lib/io.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,6 +31,7 @@ __all__ = ["BlockingIOError", "open", "IOBase", "RawIOBase", "FileIO", "BufferedRandom", "TextIOBase", "TextIOWrapper"] import os +import abc import sys import codecs import _fileio @@ -178,7 +179,7 @@ class UnsupportedOperation(ValueError, IOError): pass -class IOBase: +class IOBase(metaclass=abc.ABCMeta): """Base class for all I/O classes. |