[Zope] Calling list.remove() bug

Kapil Thangavelu kthangavelu@earthlink.net
Sun, 27 Aug 2000 18:07:00 -0700


Tim Cook wrote:
> 
> Kapil Thangavelu wrote:
> 
> > <dtml-var "foobar(_.None, _)">
> >
> > this passes it None for a client, and the current namespace as the
> > mapping, and no keyword args.
> >
> > hope that was clearer than mud.
> >
> 
> So the 'key' to this confusion is that we are passing the 'Zope
> namespace' to the python method (function) call?
> (Which I guess is REALLY just a Python namespace anyway?)

the highlights.
one is DTML tags automatically calls and give the proper
args to what they call. the second is that when you not in pure DTML, 
you need to call methods explicitly and pass them args they might need.

note the namespace is just a glorified mapping(dictionary) parts of
which, ie the REQUEST are built dynamically during the Publishing
process. you could pass the method any dictionary. but since you're
accessing the DateTime module in your function you need to access it
through the namespace.

again, all of this is more a function of how DocumentTemplate works in
the context of Zope's Publishing Process.
 
> Maybe I should study the Python source where this occurs. It's
> still VERY foggy! <g>

The source is the answer. what is the question?

from  DTMLMethod.py

   def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
        """Render the document given a client object, REQUEST mapping,
        Response, and key word arguments."""


Cheers

Kapil
> -- Tim Cook --
> FreePM Project Coordinator http://www.freepm.org
> OS Health Care Alliance Supporter http://www.oshca.org