[Zope] random.choice()

Nathan Valentine nathan@nathanvalentine.org
21 Aug 2002 20:29:54 -0400


--=-iUT+yQs8e2p/rIHJOC0a
Content-Type: multipart/mixed; boundary="=-wrP/vEj5851/Y9qJPhnw"


--=-wrP/vEj5851/Y9qJPhnw
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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?=20



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

--=-wrP/vEj5851/Y9qJPhnw
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: base64

LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjEuMC43IChHTlUv
TGludXgpCgppRDhEQlFBOVpDK3hPdHVHVkY1SkU1QVJBalhPQUtDa2l6ZDNOVzQ4ZS9jdDRKQlJP
U1ZjQ3kreDBnQ2VLN2dECkFSVTBXVC8wMkkyeGdwVjkvQmtoWnJvPQo9Q3I3egotLS0tLUVORCBQ
R1AgU0lHTkFUVVJFLS0tLS0K

--=-wrP/vEj5851/Y9qJPhnw--

--=-iUT+yQs8e2p/rIHJOC0a
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA9ZDCCOtuGVF5JE5ARApzJAJ0RiMGJHNrq0kJ0RxKIzWwfK26shgCgxlqk
iolmQ82IUfVFQiT15BCflw4=
=0xYu
-----END PGP SIGNATURE-----

--=-iUT+yQs8e2p/rIHJOC0a--