[Python-Dev] socket.try_reuse_address()

Gregory P. Smith greg at krypto.org
Fri May 2 08:50:33 CEST 2008


On Wed, Apr 30, 2008 at 10:42 AM, Trent Nelson <tnelson at onresolve.com>
wrote:

> >  if os.name == "nt":
> >      _socketmethods = _socketmethods + ('ioctl',)
> > +    _is_windows = True
> > +elif os.name == 'java':
> > +    from java.lang import System
> > +    _is_windows = 'windows' in System.getProperty('os.name').lower()
> > +elif os.name == 'posix' and sys.platform == 'cygwin':
> > +    _is_windows = True
>
> Oops, that last line should have been:
>
> elif os.name == 'ce' or (os.name == 'posix' and sys.platform == 'cygwin'):
>    _is_windows = True
>

Why even bother to check os.name == 'posix' doesn't sys.platform == 'cygwin'
mean its windows regardless of os.name?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20080501/68dc0f51/attachment.htm>


More information about the Python-Dev mailing list