You're right, Dieter.  I was thinking in Python terms and forgot about DTML
namespace lookup rules.  :-(  Yes, if we had a __getattr__ interface or used
the mapping keyword on the return value of a __getitem__-based session data
object, and if the name was not found in the namespace that is put on the
DTML stack by "with sessiondataobject", it would then be looked up in the
form and cookies namespaces, then it would attempt to be acquired, etc.
Sorry for the misinformation.

So the question becomes: do we want DTML namespace lookup magic or no DTML
namespace lookup magic for names that we attempt to look up in a session
data object?  I don't know the answer.  I'm so sick of magic at this point
that I'm apt to vote "no", but if it affords us some provable real-world
benefits, I could change this vote.  If someone would be kind enough to give
me an example where having DTML namespace lookup magic for names out of a
session data object would be very useful, I'd consider it carefully.

----- Original Message -----
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Chris McDonough" <[EMAIL PROTECTED]>
Sent: Wednesday, January 03, 2001 4:50 PM
Subject: Re: [Zope] Core Session Tracking kudos & namespaces

> Chris McDonough writes:
>  > ....
>  > Currently, nothing would be acquired, and the <dtml-var a> call will
>  > inside of a "with sessiondatamanager" even if we did have a __getattr__
>  > interface to session data objects....
> Are you sure?
> As I understand it, at least a
>    <dtml-with "sessionDataManager.getSessionData()">
> would make available all session data keys as variables,
> if they had a "__getattr__".
> If they had a "__getitem__" (maybe, the available "get" is
> already sufficient), then
>    <dtml-with "sessionDataManager.getSessionData()" mapping>
> would do the trick.
> Dieter
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> **   No cross posts or HTML encoding!  **
> (Related lists -
> )

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to