5 Sep
2001
5 Sep
'01
5:32 p.m.
Evan Simpson wrote:
Kyler B. Laird wrote:
I'm trying to read python/Products/PageTemplates/Expressions.py and python/OFS/Traversable.py but I am at a loss for the definition of has().
Just add "has=hasattr" right after "get=getattr" (line 145 of Traversable.py).
I think he wanted to know where it was defined, not where he can define it. Kyler, take a look at the definition for the restrictedTraverse method in Expressions.py: def restrictedTraverse(self, path, securityManager, get=getattr, has=hasattr, N=None, M=[]): That's where it's defined. -Michel