[Zope-dev] Another mystery for you ;-)

Chris Withers chrisw@nipltd.com
Wed, 12 Jul 2000 12:18:59 +0100


Hi Steve,

Since you found the external methods arguments thing interesting, here's
another challenge for you... ;-)

(it's actually from the same nav_tree method)

I was trying to use 'if o in REQUEST.PARENTS' to expand branches on the
way to the currently displayed object and was running into trouble which
lead me to try out the following code:

`REQUEST.PARENTS[0]`+`o`+`o==REQUEST.PARENTS[0]`+`o is
REQUEST.PARENTS[0]`

Now, this renders the following in the case where the branch _should_
expand:
<Folder instance at 88cbb30><Folder instance at 88cbb30>00

What I don't understand is how two objects, apparently at the same
memory location, return false from both 'object1==object2' and 'object1
is object2'.

Again, any ideas?

cheers,

Chris

The only vaguely related thing I can think of is that this is happening
'cos I'm working in a version and the folder object has been changed and
REQUEST.PARENTS contains the unchanged version while o contains the
changed version. If this is causing it, it's a bug ;-)