[docs] [issue19882] Closing a socket when makefile() is used

Martin Panter report at bugs.python.org
Wed Dec 4 08:21:06 CET 2013

New submission from Martin Panter:

I think the documentation is rather vague about closing the underlying OS socket. Can someone verify if the following is true (*asterisked* bits are my additions), and maybe update the documentation?

socket.close(): Close the socket *object*. *The underlying file descriptor is also closed, unless there are file objects from makefile() still open.*

socket.makefile(): Closing the file object won’t close the *file descriptor* unless *the original socket object and any other file objects have already been closed*.

assignee: docs at python
components: Documentation
messages: 205200
nosy: docs at python, vadmium
priority: normal
severity: normal
status: open
title: Closing a socket when makefile() is used
type: behavior
versions: Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the docs mailing list