RE: [Zope] Re: Two newbie questions + Zope patch
-----Original Message----- From: Evan Simpson [mailto:evan@tokenexchange.com] Sent: Thursday, September 09, 1999 9:39 AM To: Michel Pelletier; Martijn Pieters Cc: zope-dev@zope.org; zope@zope.org
<dtml-var number/3/the_larch>
Ok.
<dtml-with thingy><dtml-var "_[varwithstringpath]"></dtml-with>
That's cool.
<dtml-var "_.getattr(eric(), 'half/a/bee')">
Ouch! I can see changing var to work with relative paths, but not getattr. You can try and convince me otherwise but I think _.getattr should work as much like the python getattr as possible (after all, it *is* the python getattr!). -Michel
----- Original Message ----- From: Michel Pelletier <michel@digicool.com>
<dtml-var "_.getattr(eric(), 'half/a/bee')">
Ouch!
I can see changing var to work with relative paths, but not getattr. You can try and convince me otherwise but I think _.getattr should work as much like the python getattr as possible (after all, it *is* the python getattr!).
<chuckle> This happens to be the simplest case, since it *isn't* Python's getattr -- it's careful_getattr. In fact, I included a patch to careful_getattr in my original post! The others are more painful, since they involve patching DocumentTemplate name parameter handling and <shudder> cDocumentTemplate, respectively. Anyway, in the absence of an altered _.getattr, what would be the best way to get an unrendered equivalent of <dtml-var a/b/c>?
participants (2)
-
Evan Simpson -
Michel Pelletier