Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f32e459

Browse files
committed
Replace use of apply() with extended call syntax.
1 parent a2c2595 commit f32e459

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/asyncore.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ def connect (self, address):
319319
raise socket.error, err
320320

321321
def accept (self):
322+
# XXX can return either an address pair or None
322323
try:
323324
conn, addr = self.socket.accept()
324325
return conn, addr
@@ -521,10 +522,10 @@ def __init__ (self, fd):
521522
self.fd = fd
522523

523524
def recv (self, *args):
524-
return apply (os.read, (self.fd,)+args)
525+
return os.read(self.fd, *args)
525526

526527
def send (self, *args):
527-
return apply (os.write, (self.fd,)+args)
528+
return os.write(self.fd, *args)
528529

529530
read = recv
530531
write = send

0 commit comments

Comments
 (0)