Re: Writing tags "the hard way" in 2.2...
"Jonathan Ellis" <[email protected]> Thu, 08 Mar 2007 06:09:28 -0800
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
That's true, but it's not a big deal unless you're using [[= ]] with expressions that have side effects besides their output, which is a Bad Idea anyway. On Thu, 08 Mar 2007 14:03:47 +0200, "Iwan Vosloo" <[email protected]> said: > Hi Jonathan, > > mmm, thanks, that sortof works - only problem is that if you have a tag > such as: > > <mytag> [[= some python expression ]] </mytag> > > The python expression will always be evaluated, whether the tag should > be displayed or not... Any ideas how one can stop that from happening? > > (The problem is that the expression may break in the cases when mytag > should not be displayed.) > > -i > > On Wed, 2007-03-07 at 07:03 -0800, Jonathan Ellis wrote: > > yes, this was removed. > > > > you can easily do the same thing with an instance var yourself, though. > > > > def body(self): > > if not self.conditional: return > > ... > > > > On Wed, 07 Mar 2007 16:00:20 +0200, "Iwan Vosloo" <[email protected]> said: > > > Hi, > > > > > > we suspect another change in 2.2: > > > > > > We used to be able to write a tag (something inheriting from > > > spyceTagPlus), and set conditional=True on it. If I understand > > > correctly, if you then return None from your begin(), its body will NOT > > > be output. > > > > > > It seems this does not work the same in 2.2? > > > > > > Thanks > > > -i > > > > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > > your > > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > > > Spyce-users mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/spyce-users > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV