[Tutor] Which is safer and easier to code, raw_input or int(raw_input))?

Nathan Pinno falcon3166 at hotmail.com
Mon Jul 18 19:48:57 CEST 2005


  Luke and all,

  Anyone interested in helping me code that MasterMind-like game? I sure could use the help. 

  Right now I'm taking time to write a program that will automatically show various combos (eg a0 and x3) so that I can figure out all the various combos, so that I don't miss any.

  Nathan Pinno
    ----- Original Message ----- 
    From: luke 
    To: Nathan Pinno 
    Sent: Monday, July 18, 2005 11:44 AM
    Subject: Re: [Tutor] Which is safer and easier to code,raw_input or int(raw_input))?


    tmp = raw_input("hello, enter a number: ")
    try:
        tmp = int(tmp)
    except ValueError:
        print "sorry that wasn't a number"
      ----- Original Message ----- 
      From: Nathan Pinno 
      To: tutor at python.org 
      Sent: Monday, July 18, 2005 12:00 PM
      Subject: [Tutor] Which is safer and easier to code,raw_input or int(raw_input))?


      Hi all,

      The subject line says it all. What's the answer?

      Let's let everyone talk about this.

      Nathan Pinno.



--------------------------------------------------------------------------


      _______________________________________________
      Tutor maillist  -  Tutor at python.org
      http://mail.python.org/mailman/listinfo/tutor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050718/1de00ff5/attachment.htm


More information about the Tutor mailing list