diff Lib/socket.py @ 32160:aec9c98a47d2 legacy-trunk

Add weakref support to sockets and re pattern objects.
author Raymond Hettinger <python@rcn.com>
date Mon, 31 May 2004 03:09:25 +0000
parents a910b822b12c
children 90da70986407
line wrap: on
line diff
--- a/Lib/socket.py	Mon May 31 00:35:52 2004 +0000
+++ b/Lib/socket.py	Mon May 31 03:09:25 2004 +0000
@@ -147,7 +147,8 @@
 
     __doc__ = _realsocket.__doc__
 
-    __slots__ = ["_sock", "send", "recv", "sendto", "recvfrom"]
+    __slots__ = ["_sock", "send", "recv", "sendto", "recvfrom",
+                 "__weakref__"]
 
     def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None):
         if _sock is None: