file closing

Skip Montanaro skip at pobox.com
Thu May 22 10:47:34 EDT 2003


    [second case]
    >> file('test.dat','w').write(chr(0)*1000000)

    >> where the second one relies on garbage collection?

    Laotseu> Yes, AFAIK.

More precisely, it relies on reference counting.  There's no cycle which
needs to be broken, so CPython's cyclical garbage collection isn't involved.

Skip






More information about the Python-list mailing list