[Zope] contrext.REQUEST and hasattr
Bryan C. Andregg
bryan.andregg@duke.edu
Thu, 8 Aug 2002 15:35:26 -0400
--TBDBusIORirWKjWQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Trying to use this bit of code in a Python script:
if not hasattr(context.REQUEST,'learners')
I get a a KeyError for for learners. Am I missing something, because this is
exactly what hasattr is supposed to be used for.
--=20
Bryan C. Andregg Duke University Medical Center
Programmer Dept. of Anesthesiology
e <bryan.andregg@duke.edu>
p +1 919 684 6201
--TBDBusIORirWKjWQ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9Usf+j9pElyS/cakRAheiAJ0Zoh2pK77EjYS/7/D4+ChkWsGXJQCfVcsB
wnaq1b0k6vEFDCYXtN+6RiU=
=SEYr
-----END PGP SIGNATURE-----
--TBDBusIORirWKjWQ--