quetz-mod_python-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Mod_python Wiki] Trivial Update of "GuessingGame" by newacct
Date Tue, 26 Jan 2010 01:34:10 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Mod_python Wiki" for change notification.

The "GuessingGame" page has been changed by newacct.
http://wiki.apache.org/mod_python/GuessingGame?action=diff&rev1=9&rev2=10

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

  
  import random
  buttonText = "Submit"
- if not session.has_key('answer') or not form.has_key('input'):
+ if 'answer' not in session or 'input' not in form:
      session['answer'] = random.randint(1, 100) # create 'answer' session variable
      session['guesses'] = 0 # create 'guesses' session variable 
      message = "Guess a Number Between 1 and 100"

Mime
View raw message