Eli Bendersky added the comment:

Great catch, Charles-François, thanks. It's actually an interesting example in 
favor of the approach - it's very nice to see descriptive family names in the 
data returned by getaddrinfo, instead of obtuse numeric values.

The attached patch fixes it in a similar vein to what was done for the family 
accessor: getaddrinfo is overridden in Python and does the necessary 
conversion. User code is unaffected. It has to rebuild the list (since those 
are tuples) but I don't think it matters in terms of performance for this 
specific function. As a bonus, getaddrinfo got a much nicer docstring :)

----

Note again that if this is acceptable, I'm going to similarly convert SOCK_* 
and post a full patch (with some documentation too).

----------
Added file: http://bugs.python.org/file31313/socket-intenum-af.4.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18720>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to