From: Tim Peters Date: Thu, 29 May 2003 18:50:45 +0000 (+0000) Subject: Give the Windows socket wrapper function default values for its 'family' X-Git-Tag: v2.2.3~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6de17d2ce334f88d601646694f6d7a6cbfa5416e;p=thirdparty%2FPython%2Fcpython.git Give the Windows socket wrapper function default values for its 'family' 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. --- diff --git a/Lib/socket.py b/Lib/socket.py index 5fac123c986e..9b8b4738f965 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -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: