[Zope] random.choice()

Chris Beaven Chris@d-designz.co.nz
Thu, 22 Aug 2002 12:41:59 +1200


Just checking, you are doing this aren't you?:

return printed

-----Original Message-----
From: Nathan Valentine [mailto:nathan@nathanvalentine.org]
Sent: Thursday, 22 August 2002 12:31 p.m.
To: zope@zope.org
Subject: [Zope] random.choice()



import random
print random.choice(["true", "false"])

In a stand-alone .py file, this will print either "true" or "false". In
a Python script in the ZODB, it prints "None". What gives? 



-- 
---
Nathan Valentine - nathan@nathanvalentine.org
Jabber: NRVesKY AIM: NRVesKY ICQ: 39023424