Message18883
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.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:18:05 | admin | link | issue835300 messages |
2007-08-23 14:18:05 | admin | create | |
|