Author mrm
Recipients georg.brandl, mrm
Date 2008-05-02.18:57:58
SpamBayes Score 0.0112558
Marked as misclassified No
Message-id <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za>
In-reply-to
Content
the url 
  http://docs.python.org/lib/socket-example.html
gives an example that uses socket.getaddrinfo that has this code

   HOST=''
   ...
   for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC,
     socket.SOCK_STREAM, 0, socket.AI_PASSIVE)

but this fails on freebsd 6.1/python 2.5 as follows

> /usr/home/mrm/s2.py(30)<module>()
-> for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, 
socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
(Pdb) p HOST
''
(Pdb) n
gaierror: (8, 'hostname nor servname provided, or not known')
> /usr/home/mrm/s2.py(30)<module>()

but setting 
  HOST=None
works fine.

either this is a doc bug or a code bug, your pick.
History
Date User Action Args
2008-05-02 18:57:59mrmsetspambayes_score: 0.0112557 -> 0.0112558
recipients: + mrm, georg.brandl
2008-05-02 18:57:59mrmsetspambayes_score: 0.0112557 -> 0.0112557
messageid: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za>
2008-05-02 18:57:58mrmlinkissue2742 messages
2008-05-02 18:57:58mrmcreate