Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > str() or repr()

Reply
Thread Tools

str() or repr()

 
 
tcronj
Guest
Posts: n/a
 
      02-12-2004
Have reasently upgraded to PySQLite 0.5.
I now have to "typecast" returned values to the "string expecting" GUI
widgets (wxPython).

Afrer reading the explanation, I'm still not clearer wich is better to
use... str() or repr()

example: self.wxTextCtrl.Setvalue( str(val["typedate"]))
## or repr(val["typedate"])

self.wxTextCtrl.Setvalue( str(val["typefloat"]))
## or repr(val["typefloat"])



TIA.
T

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments