[Zope-dev] Zope 2.7.2, restrictedTraverse or hasattr

Kai Hoppert kai.hoppert at tomcom.de
Mon Aug 2 08:04:12 EDT 2004


Hi all,

i actually have a Problem with restrictedTraverse and hasattr.

Object1
	Object2
	Object3
		

I want to test if there exists a Object in Object3 wich has the same id and meta type how Object2 (id=myobject).
so i ask

Object3.restrictedTraverse('myobject',None) or

hasattr(Object3,'myobject')

i every time get's true back. I know that he jump's to Object2. i testet this with absolute_url, but this makes no sense i think. Either i never noticed that this both funktions works in this way or it is a bug. If it is no bug has anybody a solution for my problem?

Greetings

Kai Hoppert 
___________________________________________________
tomcom Gesellschaft für Informationstechnologie mbH
Heuriedweg 14 | D-88131 Lindau
Fon +49 (0)8382 975844 | Fax +49 (0)8382 975855
kai.hoppert at tomcom.de | http://www.tomcom.de

This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents.  tomcom disclaims all responsibility and accepts no liability for the consequences of any person acting, or refraining from acting on the contents of this document.  Any unauthorised form of dissemination, copying, disclosure, modification, distribution and/or publication of this message is strictly prohibited. For information about tomcom please contact us on +49.8382.975844 or visit our web site at www.tomcom.de




More information about the Zope-Dev mailing list