Arrgh! Please help.

chibaA at TinterlogD.Tcom chibaA at TinterlogD.Tcom
Sat May 13 22:36:15 EDT 2000


Yeah... it says the value is int - which obviously won't work.  

Is there any way to FORCE fields to be of string?  Here's the way that
I'm defining that dictionary:

rv = {}
rv['id'] = '3'

etc., etc..

and it assigns it an INT.??  

Thanks again,

kc

On Sun, 14 May 2000 02:20:49 GMT, "Fredrik Lundh" <effbot at telia.com>
wrote:

><chibaA at TinterlogD.Tcom> wrote:
>> I'm pulling my hair out as to why I get this error:
>
>it just means that value isn't a string.  
>
>to figure out what value happens to be, try adding
>the following debug statement:
>
>> For this code: 
>> if 1:
>>         print "Content-Type: text/html\n\n"
>>         print "whatever",
>>         oL = ""
>>         for key,value in rv.items():
>                  print type(value)
>>                 oL = oL + value + "&" + "blah"
>>         print "blah",
>>         print "=",
>>         print oL
>
>...
>
>> And while I'm at it, is there any way to use consecutive print
>> statements, and NOT have spaces in the output? ( I know comma gets rid
>> of the \n, but not the spaces).
>
>how about:
>
>import sys
>write = sys.stdout.write
>
>write("sp")
>write("am")
>
></F>
>
><!-- (the eff-bot guide to) the standard python library:
>http://www.pythonware.com/people/fredrik/librarybook.htm
>-->
>




More information about the Python-list mailing list