str() or repr()

Discussion in 'Python' started by tcronj, Feb 12, 2004.

  1. tcronj

    tcronj Guest

    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
    tcronj, Feb 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page