> I think "the spec" would be the socket API. For sockets, that is POSIX.
> According to
> 
> http://www.opengroup.org/pubs/online/7908799/xns/getsockname.html
> 
> the result is unspecified if the socket has not been bound to a local
> name.
> 
> However, Windows does not implement POSIX here; instead, it implements
> WinSock, which specifies that WSAEINVAL is returned.

So, two different specs meet in the Python API, which means that we
have to define the behavior ourselves.  I'd suggest returning None from
an unbound socket.

Bill
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to