New submission from Giampaolo Rodola' <g.rod...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue8866>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to