Re: [Zope-dev] [Vote] PEP308 voting began
In article <[EMAIL PROTECTED]> you write: > Guido van Rossum wrote: > > > > IMO TALES should solve this for itself by introducing an if/then/else > > expression form rather than depending on Python. If you can have a > > "not:.." expression, surely you can have an "if:..:then:..:else:.." > > expression. > > I think not: is dubious and I'd find if-then-else way over the lines... What?!! not: is very useful. How do you write alternatives without it? Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:[EMAIL PROTECTED] ___ 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 )
Re: [Zope-dev] [Vote] PEP308 voting began
Guido van Rossum wrote at 2003-3-4 15:23 -0500: > if-then-else expression > IMO TALES should solve this for itself by introducing an if/then/else > expression form rather than depending on Python. If you can have a > "not:.." expression, surely you can have an "if:..:then:..:else:.." > expression. Hopefully, we will get it in Python. There, it is useful, too, being clearer (more explicit) than "cond and expr1 or expr2" and less error prone... Dieter ___ 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 )
Re: [Zope-dev] [Vote] PEP308 voting began
--On Tuesday, March 04, 2003 03:23:54 PM -0500 Guido van Rossum <[EMAIL PROTECTED]> wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a "not:.." expression, surely you can have an "if:..:then:..:else:.." expression. If it was just TALES I'd agree. However I suspect that many other systems built on Python have the same problem of allowing only Python expressions in various contexts. It seems very likely that most of the other web templating systems have this limitation. If this is true then, IMO, it's better to have one way to do it across all the applications built on Python than have every app. do it differently. If I didn't believe this I would have voted for no change to the language. Dan Pierson ___ 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 )
[Fwd: Re: [Zope-dev] [Vote] PEP308 voting began]
I think this was for the list... Chris Original Message Subject: Re: [Zope-dev] [Vote] PEP308 voting began Date: Wed, 05 Mar 2003 08:42:10 -0500 From: Brian Brinegar <[EMAIL PROTECTED]> To: Chris Withers <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Not sure if this applies, but lets say I have something like: Item 1 Item 2 When this is viewed outside of TAL, say by a designer in Dreamweaver, both styles are apparent and their presentation can be changed by the designer. Where something like this: Item would not include both versions of the presentation when viewed outside of TAL. I've always assumed any kind of if/else combo would break the change design after implementation aspect of page templates. However a little extra work for designers saves a ton of duplication for developers, so I think we should go with it. I also agree that it should be an addition to TAL rather than using whatever python ends up with. That's my few cents. -Brian Chris Withers wrote: > Guido van Rossum wrote: > >> >> IMO TALES should solve this for itself by introducing an if/then/else >> expression form rather than depending on Python. If you can have a >> "not:.." expression, surely you can have an "if:..:then:..:else:.." >> expression. > > > I think not: is dubious and I'd find if-then-else way over the lines... > > Chris > > > ___ > 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 ) ___ 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 )
Re: [Zope-dev] [Vote] PEP308 voting began
Guido van Rossum wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a "not:.." expression, surely you can have an "if:..:then:..:else:.." expression. I think not: is dubious and I'd find if-then-else way over the lines... Chris ___ 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 )
Re: [Zope-dev] [Vote] PEP308 voting began
Guido van Rossum wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a "not:.." expression, surely you can have an "if:..:then:..:else:.." expression. --Guido van Rossum (home page: http://www.python.org/~guido/) Yes, I'd be interested in seeing some kind of expression superset operator in TALES such that you could use some boolean logic in expressions which had subexpressions of different types (ie path expressions vs python expressions). Currently the "punt" is to go out to Python for any logic other than the path expression OR syntax. e.g. tal:define="variable tales: path: path_component | string: foo" An inline if/else might be C like tal:define="variable tales: local_var ? path: path_componenta : string: foo" where "tales:" is simply whatever the meta-expression handler name is. ___ 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 )
Re: [Zope-dev] [Vote] PEP308 voting began
> Attention: cross post > > PEP308 is concerned with the introduction of a ternary conditional > operator (something like an "if cond: val_true else: val_false") > into Zope. > > In my view, such an operator would make TALES expressions > easier because we could get rid of the "and/or" hack to > represent conditionals and we could forget about the "test" > function, which evaluates too eagerly. > > Please have a look at PEP308 and consider voting. > Details in "comp.lang.python.announce". > > Dieter IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a "not:.." expression, surely you can have an "if:..:then:..:else:.." expression. --Guido van Rossum (home page: http://www.python.org/~guido/) ___ 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 )
[Zope-dev] [Vote] PEP308 voting began
Attention: cross post PEP308 is concerned with the introduction of a ternary conditional operator (something like an "if cond: val_true else: val_false") into Zope. In my view, such an operator would make TALES expressions easier because we could get rid of the "and/or" hack to represent conditionals and we could forget about the "test" function, which evaluates too eagerly. Please have a look at PEP308 and consider voting. Details in "comp.lang.python.announce". Dieter ___ 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 )