[ Jens Vagelpohl wrote:] > > On 13 Oct 2005, at 11:39, Jürgen Herrmann wrote: >> up to some time in them i could just write: >> tal:define="results python:here.Catalog.searchResults()" >> >> it seems this isn't working anymore, the catalog would return >> all brains instead of seraching the relevant ones... (completely >> ignoreing everything in REQUEST) >> >> instead i have to write now: >> tal:define="results python:here.Catalog.searchResults >> (REQUEST=request)" >> >> i suspect that the catalog was able to acquire REQUEST via >> self.REQUEST >> and this isn't working anymore. has anyone had a similar problem? i >> don't know what i have changed leading to these kinds of problems... > > Apart from whether this worked previosuly or not, it is bad coding > practice to rely on assumptions such as "it will somehow acquire the > REQUEST". You should really change your code to explicity pass in > REQUEST everywhere. Then you can stop worrying. > > jens > thanks for the answer, the coding style is one thing, and i don't have the least bit of a problem to stick with this in the future (already changed all the occurrences anyway to make it work again).
what i'm worried about is wether i did break anything else, possibly with even worse results... (i don't like hidden bugs) btw. is it also bad practice to use self.REQUEST in methods? what about def foo(self, REQUEST=None), when and how is REQUEST passed there? is it also not a good coding style, if not passing it directly? regards, juergen herrmann _______________________________________________________________________ >> XLhost.de - eXperts in Linux hosting << Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de _______________________________________________ Zope maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
