Neil Muller <[EMAIL PROTECTED]> added the comment:

The documentation says: 

For *host* and *port*, by passing either an empty string or ``None``,
you can pass ``NULL`` to the C API, so the documentation says it should
work.

This doesn't work because PyString_AsString retruns an empty string, not
NULL. The attached patch adds a check in socketmodule.c to fix this for
host and port.

It's highly debatable whether this is better than fixing the
documentation, though.

----------
nosy: +Neil Muller
Added file: http://bugs.python.org/file10238/socket_patch.c

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2742>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to