Do I need to call close on the handle returned by urlopen?

krzysztof.zelechowski at syncron.com krzysztof.zelechowski at syncron.com
Mon Jul 14 17:08:26 CEST 2014


http://bugs.python.org/issue12955

Użytkownik  napisał w wiadomości grup 
dyskusyjnych:lq0sar$r6e$1 at mx1.internetia.pl...

The tutorial says that I should use "with open" to close the file handle
properly.  The reference documentation for urlopen mentions that the handle
returned is like a file handle but the code samples below do not bother to
close the handle at all.  Isn’t it inconsistent? 




More information about the Python-list mailing list