what u'=' mean???

Discussion in 'Python' started by Luiz Siqueira Neto, Jul 17, 2003.

  1. What
    ----
    u'='
    ----
    mean??

    Ex:

    args = [u'='.join(k,safe_eval(v) for k, v in attrs.items()]
     
    Luiz Siqueira Neto, Jul 17, 2003
    #1
    1. Advertising

  2. On Thu, 17 Jul 2003 12:24:57 -0300, Luiz Siqueira Neto wrote:

    > What
    > ----
    > u'='


    Its just a unicode string.
    The string constants in Python can be prefixed with a u. Instead of
    building a string object for that constant, the interpreter will build a
    Unicode string object.

    You can also prefix them with r, to make the interpreter ignore escape
    codes.
    For example:
    >>> print 'a\nb'

    a
    b
    >>> print 'a\\nb'

    a\nb
    >>> print r'a\nb'

    a\nb
    >>>


    And you can use the combined ur prefix.


    --
    Ricardo
     
    Ricardo Bugalho, Jul 17, 2003
    #2
    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.
Similar Threads
  1. Pratip Mukherjee

    Help: what does this VHDL code mean?

    Pratip Mukherjee, Jun 22, 2005, in forum: VHDL
    Replies:
    16
    Views:
    1,293
    Kim Enkovaara
    Jun 27, 2005
  2. methi
    Replies:
    1
    Views:
    874
    info_
    Jun 23, 2005
  3. Lyn
    Replies:
    5
    Views:
    532
    Terry Michaels
    May 6, 2004
  4. Weng Tianxiang

    Mean value filter

    Weng Tianxiang, Dec 7, 2005, in forum: VHDL
    Replies:
    1
    Views:
    1,412
    Senthil
    Dec 12, 2005
  5. C Barrington-Leigh
    Replies:
    1
    Views:
    1,237
    Tim Leslie
    Sep 10, 2010
Loading...

Share This Page