]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Give the Windows socket wrapper function default values for its 'family'
authorTim Peters <tim.peters@gmail.com>
Thu, 29 May 2003 18:50:45 +0000 (18:50 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 29 May 2003 18:50:45 +0000 (18:50 +0000)
and 'type' arguments.  This improves x-platform compatibility (e.g., on
Unix systems socket() already supported these default arguments).

No need to do anything here for 2.3 -- it already fixed this glitch in a
different way.

Lib/socket.py

index 5fac123c986e23a233de782eb1a29155bdf0b7b4..9b8b4738f9655b1a47ecfbe3460b2e0482a6cd58 100644 (file)
@@ -52,7 +52,7 @@ if (sys.platform.lower().startswith("win")
 
     _realsocketcall = _socket.socket
 
-    def socket(family, type, proto=0):
+    def socket(family=AF_INET, type=SOCK_STREAM, proto=0):
         return _socketobject(_realsocketcall(family, type, proto))
 
     try: