Convert from unicode to int

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tor Erik Sønvisen

    #1

    Convert from unicode to int

    Hi

    Is there any simpler way to convert a unicode numeric to an int than:

    int(u'1024'.enc ode('ascii'))

    ??

    regards tores


  • Max M

    #2
    Re: Convert from unicode to int

    Tor Erik Sønvisen wrote:[color=blue]
    > Hi
    >
    > Is there any simpler way to convert a unicode numeric to an int than:
    >
    > int(u'1024'.enc ode('ascii'))[/color]


    why doesn't:

    int(u'104')

    work for you?


    --

    hilsen/regards Max M, Denmark

    A small collection of CLAP synths and effects inspired by classic hardware.

    IT's Mad Science

    Comment

    • Grant Edwards

      #3
      Re: Convert from unicode to int

      On 2005-09-22, Tor Erik Sønvisen <tores@stud.cs. uit.no> wrote:[color=blue]
      > Hi
      >
      > Is there any simpler way to convert a unicode numeric to an int than:
      >
      > int(u'1024'.enc ode('ascii'))[/color]
      [color=blue][color=green][color=darkred]
      >>> int(u'1024')[/color][/color][/color]
      1024

      Didn't that work for you when you tried it?

      --
      Grant Edwards grante Yow! FIRST, I'm covering
      at you with OLIVE OIL and
      visi.com PRUNE WHIP!!

      Comment

      Working...