This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients
Date 2004-12-20.15:04:49
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=44345

I'm pretty sure I know why you filed this item.  socket.py
contains code to work around shortcomings on Windows and BeOS 
(neither were able to dup() sockets).  At some point we
incorporated that
same code for other platforms for consistency reasons, thus
underlying
sockets are not really dup'd:

>>> import socket
>>> s = socket.socket()
>>> s
<socket._socketobject object at 0x81d9dec>
>>> t = s.dup()
>>> t
<socket._socketobject object at 0x81df02c>
>>> t._sock
<socket object, fd=3, family=2, type=2, protocol=0>
>>> s._sock
<socket object, fd=3, family=2, type=2, protocol=0>
>>> id(s._sock)
136563280
>>> id(t._sock)
136563280

Most of the time this doesn't affect anything, but I believe
it does
in certain cases.
History
Date User Action Args
2007-08-23 14:18:05adminlinkissue835300 messages
2007-08-23 14:18:05admincreate