Kaydet (Commit) b7f136e7 authored tarafından Guido van Rossum's avatar Guido van Rossum

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.
üst bfc672b1
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment