mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue 11177: asyncore's create_socket() arguments can now be omitted.
This commit is contained in:
parent
0bd4deba38
commit
103a6d6cd6
4 changed files with 18 additions and 14 deletions
|
@ -287,7 +287,7 @@ class dispatcher:
|
|||
del map[fd]
|
||||
self._fileno = None
|
||||
|
||||
def create_socket(self, family, type):
|
||||
def create_socket(self, family=socket.AF_INET, type=socket.SOCK_STREAM):
|
||||
self.family_and_type = family, type
|
||||
sock = socket.socket(family, type)
|
||||
sock.setblocking(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue