On 5/9/06, Jonathan [EMAIL PROTECTED] wrote:
I think I am misunderstanding something basic about python/zope here. Why
does a TOC object evaluate to false?
Well, why not? If you are checking for none-ness, use is None.
Evaluating the object is wrong.
If the TOC object evaluates to something
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 9 May 2006, at 16:18, Jonathan wrote:
gc= TransientObjectContainer at GarbageCollector
GarbageCollector exists
I think I am misunderstanding something basic about python/zope
here. Why does a TOC object evaluate to false?
I think the basic
--On 9. Mai 2006 11:18:25 -0400 Jonathan [EMAIL PROTECTED] wrote:
I have a short python script:
gc = context.restrictedTraverse('coup/temp_folder/GarbageCollector', None)
print 'gc=',str(gc)
if gc:
print 'GarbageCollector exists'
else:
print 'No GarbageCollector'
which, when run
:25 AM
Subject: Re: [Zope] A quick zope/python question
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 9 May 2006, at 16:18, Jonathan wrote:
gc= TransientObjectContainer at GarbageCollector
GarbageCollector exists
I think I am misunderstanding something basic about python/zope here.
Why