CSV performance

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Tue Apr 28 23:21:00 EDT 2009


In message <gt47lc$kar$03$1 at news.t-online.com>, Peter Otten wrote:

> gc.disable()
> # create many small objects that you want to keep
> gc.enable()

Every time I see something like this, I feel the urge to save the previous 
state and restore it afterwards:

    save_enabled = gc.isenabled()
    gc.disable()
    # create many small objects that you want to keep
    if save_enabled :
        gc.enable()
    #end if

Maybe that's just me. :)




More information about the Python-list mailing list