[Zope] - Referring to URL pieces within Z Publisher/DTML

Andreas Kostyrka andreas@ag.or.at
Sat, 19 Dec 1998 21:21:19 +0100 (CET)


On Sat, 19 Dec 1998 skip@calendar.com wrote:

> 
> Me:
>     return self.template(month=month, year=year, cal=cal, hint=hint,
> 			 REQUEST=REQUEST)
> 
> Andreas:
> 
>     return self.template(REQUEST,month=mont,year=year,cal=cal,
> 			 hint=hint)
> 
> Thanks, I'll give it a try, however, I don't understand what the difference
> in the function calls is.  Why should it matter that REQUEST is the first
> argument (and called without using keyword syntax), given that I've
> explicitly named the formal parameter to which I want the REQUEST object
> bound?
The first argument is used as a mapping argument. Curiosly, if you have:
x=HTMLFile("abc",x,y=y)(X,Y=Y)

Then x and X are treated differently:
x   can only be a mapping.
X   may be a mapping or object, as it also queried with getattr().

At least that's what I've experienced.

Andreas
-- 
Win95: n., A huge annoying boot virus that causes random spontaneous system
     crashes, usually just before saving a massive project.  Easily cured by
     UNIX.  See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.