Re: slicing the end of a string in a list
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: slicing the end of a string in a list

From: John Salerno <johnjsal@NOSPAMgmail.com>
Date: Mon Mar 06 2006 - 17:51:54 CET

Steve Holden wrote:

> It's not possible to perform an explicit close if, as in this case, you
> don't have an explicit reference to the file object.
>
> In CPython it's not strictly necessary to close the file, but other
> implementations don't guarantee that a file will be closed after the
> last reference is deleted.
>
> So for fullest portability it's better explicitly close the file.
>
> regards
> Steve

Thanks!
Received on Sun Apr 30 10:59:04 2006