On Fri, Sep 05, 2003 at 09:46:52AM -0400, Gary Poster wrote: > Python <script> support in TAL
I'm not sure whether to be overjoyed or very afraid :-) IIRC, zope 3 does not currently have an equivalent to zope 2's Script (Python). Chris McDonough and I were going to consider this topic "when we have time", but you know how that goes. Sorry if i'm flogging a dead horse, but: Think of the xp practice, "refactor early and often". I'd like zope 3 to easily support that practice, whereas zope 2 sometimes hinders it. What I mean is: all ttw python code should be as compatible as possible. I don't want a situation analogous to zope 2 where python has to be written differently in different contexts (e.g. "here" vs. "context" vs. the overly magical "_"). Little variations like this mean that refactoring often necessitates some gratuitous rewriting, which increases the chances of breakage. And it means that zope 2 newbies who are new to python have an unnecessarily confusing introduction to the language, and pythonistas who are new to zope 2 may be frustrated (as I was) with the sometimes "perlish" experience of working with zope 2. Now, obviously it's not possible to reach from a Page Template into a z2-style Script (Python) and e.g. pull out a global variable, as is done in your embedded script example. Maybe that's a use case for the Persistent Modules which I've heard Jim talk about? But the goal I have in mind is that, aside from such inevitable scoping issues, python code is python code and can (ideally) be completely portable between templates, Scripts, and Persistent Modules. (disclaimer: i haven't looked at Persistent Modules so maybe they're not relevant to this discussion.) -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SENATOR'S WIFE DOOM! (random hero from isometric.spaceninja.com) _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )