[Zope-dev] PythonMethods: Can't Slice context.REQUEST.PARENTS

Dieter Maurer dieter@handshake.de
Tue, 14 Nov 2000 23:03:37 +0100 (CET)


Evan Simpson writes:
 > From: The Doctor What <docwhat@gerf.org>
 > > Using context.this().id, self.this().id, m_self.this().id
 > all get me
 > > the same things:
 > > Folder, Zope, and my method.  None give me the DTML
 > Document
 > > foo_html.
 > >
 > > This would seem to be an important thing.
 > 
 > The only information about your caller that you can get is
 > the contents of their namespace.  So, in the final release,
 > you would be able to bind the caller's namespace to "_" and
 > write _.this().id.  That requires a change to Zope, though,
 > so it doesn't work yet.  You *could* work around this by
 > explicitly passing the namespace (or this(), for that
 > matter).
Why can't I get the acquisition context as with External Methods?
(if they are called directly via the Web, namespaces are not
yet build and the acquisition context obtained via a "self"
parameter is everything I have).


Dieter