[New-bugs-announce] [issue8866] socket.getaddrinfo() should support keyword arguments

Giampaolo Rodola' report at bugs.python.org
Tue Jun 1 00:50:12 CEST 2010


New submission from Giampaolo Rodola' <g.rodola at gmail.com>:

As of now socket.getaddrinfo() only supports positional arguments, so that if I want to, say, specify "flags" argument I'm forced to specify "0" for other missing arguments:

>>> socket.getaddrinfo("www.python.org", 0, 0, 0, socket.SOL_TCP)
[(2, 1, 6, '', ('82.94.164.162', 0)), (10, 1, 6, '', ('2001:888:2000:d::a2', 0, 0, 0))]
>>>
>>> socket.getaddrinfo("www.python.org", flags=socket.SOL_TCP)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: getaddrinfo() takes no keyword arguments
>>>

----------
components: Library (Lib)
messages: 106817
nosy: exarkun, giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: socket.getaddrinfo() should support keyword arguments
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8866>
_______________________________________


More information about the New-bugs-announce mailing list