Paul Winkler wrote:
On Wed, Jul 30, 2003 at 04:49:19PM -0400, Shane Hathaway wrote:
If you want to look for a solution, consider using *only* Python expressions--no path expressions. You'll get a lot of mileage that way, but at the expense of syntax clashes. Who knows, you might find a pretty good solution.


This stuff is hard :-\   Attached is what I've been able to come up with.
(ducking)


I must say that using only Python expressions is crippling in a couple of ways. First, it's not true Python if you're only allowed to write expressions. Many language features require statements. Second, we established earlier that Python expressions in templates should have a "python:" prefix, but if every expression uses it, it would be repetitious enough to be annoying.


Python's syntax is good, but there are certain uses it doesn't cover well. As another example of something Python syntax doesn't quite fit, I've been pondering lately how to translate the ever-useful 'find' shell command into Python function calls. The Python version always seems to come out a lot more complicated.

find . -name '.*' -a -type d -prune -o -name '*.py' -print

Shane


_______________________________________________
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 )

Reply via email to