• Guido van Rossum's avatar
    Another refactoring. Changed 'socket' from being a factory function · 4ce5c677
    Guido van Rossum authored
    to being a new-style class, to be more similar to the socket class
    in the _socket module; it is now the same as the _socketobject class.
    Added __slots__.  Added docstrings, copied from the real socket class
    where possible.
    
    The _fileobject class is now also a new-style class with __slots__
    (though without docstrings).  The mode, name, softspace, bufsize and
    closed attributes are properly supported (closed as a property; name
    as a class attributes; the softspace, mode and bufsize as slots).
    4ce5c677
socket.py 10.9 KB