pySQLite Insert speed

Steve Holden steve at holdenweb.com
Tue Mar 4 11:09:54 EST 2008


mmm wrote:
> Oops  I did make a mistake. The code I wanted to test should have been
> 
> import copy
> print 'Test 1'
> pf= '?,?,?,?'
> sqlx1= 'INSERT INTO DTABLE2 VALUES ( %s ) ' % pf
> print sqlx1
> 
> print
> print 'Test 2'
> sqlx2= copy.copy(sqlx1)
> sqlx3= sqlx1
> pf= '?,?,?, ****'
> print 'sqlx1= ', sqlx1
> print 'sqlx2= ', sqlx2
> print 'sqlx3= ', sqlx2
> 
> and the results would
>  == output
>  Test group 1
>  INSERT INTO DTABLE2 VALUES ( ?,?,?,? )
> 
>  Test group 2
>  sqlx1=  INSERT INTO DTABLE2 VALUES ( ?,?,?,? )
>  sqlx2=  INSERT INTO DTABLE2 VALUES ( ?,?,?,? )
>  sqlx3=  INSERT INTO DTABLE2 VALUES ( ?,?,?,? )
> 
> Such that sqlx1 does to change with the re-assignment of 'pf'
> And of course immutables such as strings are immutable.  Got it now.

You still aren't showing us the code you are actually running. Why can't 
you just paste it into your message?

But anyway, you appear to have got the drift now.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list