Re: [Zope-dev] ZCatalog Indexes tab crawls...

2003-07-29 Thread Chris Withers
Dieter Maurer wrote: But overall, unless you have special (non DC derived) indexes, That can well be the case... Anyway, what are we going to do about this crawling tab? Chris ___ Zope-Dev maillist - [EMAIL PROTECTED]

Re: [Zope-dev] Object Type Assocation And Death To index_html

2003-07-29 Thread Chris Withers
Christopher N. Deckard wrote: Can you put us to the underlying code and I'll take a look at what needs to be done? This is something that is going to be very useful to us. Have a trawl through the list archives, I'm afraid I can't remember where the code is... cheers, Chris

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Chris Withers
Shane Hathaway wrote: Literally, user_files/int:0 says get item 0 of user_files, interpreting '0' as an integer. Technically, this could be interpreted as get the attribute named 0 or item 0, but an attribute name must be a string, so implicitly it really just says get item 0. We've come up

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Chris Withers
Philipp von Weitershausen wrote: AFAIK, Jim wants this for Zope3 for some time now. The idea is to implement this with named adapters. The framework is implemented, as are one or two examples, IIRC... The question remains how to implement this in Zope2 as we don't have adapters there. The

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Chris Withers
Evan Simpson wrote: 'key:' -- use item access with the prefixed string. 'index:' -- use item access with the prefixed integer. 'attr:' -- use attribute access with the prefixed string. In each case, the path traversal fails if the specified access method fails, rather than trying other access

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Chris Withers
Paul Winkler wrote: On Wed, Jul 23, 2003 at 11:07:20AM -0500, Evan Simpson wrote: ... This would allow options/a_mapping/key:items/index:0 rather than python:options['a_mapping']['items'][0]. Why is that an improvement? Personally, I find it much easier to read... I wonder what

Re: [Zope-dev] TALES wish : the thistemplate variable

2003-07-29 Thread Chris Withers
Shane Hathaway wrote: We recently had a discussion about this: http://dev.zope.org/Wikis/DevSite/Proposals/MacroParameters The conclusion we came to is that we need a new kind of construct, tentatively called a subtemplate. Subtemplates accept parameters and have full control over the

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread robert
Am Dienstag, 29. Juli 2003 19:22 schrieb Chris Withers: Paul Winkler wrote: On Wed, Jul 23, 2003 at 11:07:20AM -0500, Evan Simpson wrote: ... This would allow options/a_mapping/key:items/index:0 rather than python:options['a_mapping']['items'][0]. Why is that an improvement?

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Paul Winkler
On Tue, Jul 29, 2003 at 06:22:38PM +0100, Chris Withers wrote: Paul Winkler wrote: On Wed, Jul 23, 2003 at 11:07:20AM -0500, Evan Simpson wrote: ... This would allow options/a_mapping/key:items/index:0 rather than python:options['a_mapping']['items'][0]. Why is that an improvement?

Re: [Zope-dev] Functional testing of export/import?

2003-07-29 Thread Paul Winkler
On Mon, Jul 28, 2003 at 02:49:33PM -0400, Casey Duncan wrote: You can usually commit a subtransaction to get a _p_jar and oid (I think) set. You can still abort this at the end of the test to clean up. yep, this seems to work very nicely! Thanks Casey! def setUp(self): ...

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Jim Penny
On Tue, 29 Jul 2003 14:27:34 -0400 Paul Winkler [EMAIL PROTECTED] wrote: On Tue, Jul 29, 2003 at 06:22:38PM +0100, Chris Withers wrote: Paul Winkler wrote: On Wed, Jul 23, 2003 at 11:07:20AM -0500, Evan Simpson wrote: ... This would allow options/a_mapping/key:items/index:0

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Evan Simpson
OK, I've checked in a sample implementation on evan-pathprefix-branch. It allows for registering prefixes with: from Products.PageTemplates.PathPrefixes import registerSubPathPrefix registerSubPathPrefix('call', call_compiler, call_handler) It includes an implementation of 'var:', 'call:',

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Christopher Boomer
I have been watching this thread silently for what seems like weeks, and I think it is time for a newcomer's opinion. I like to read above my station ;-) options/a_mapping/key:items/index:0 rather than python:options['a_mapping']['items'][0]. They look very similar to me. There is little or

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Shane Hathaway
[Paul Winkler] I guess I don't understand the goal. Are we trying to make it so that zpt authors don't have to know any python? [Chris Withers] For me, that would be ideal... [Paul Winkler] I really think that's a mistake. Guys, that line of thinking is a distraction. ZPT authors ought to learn

Re: [Zope-dev] TALES wish : the thistemplate variable

2003-07-29 Thread Shane Hathaway
Chris Withers wrote: http://dev.zope.org/Wikis/DevSite/Proposals/MacroParameters I'm swinging round to the ideas behind this proposal having initially been against it. What's the status of implementation? Somewhere in the clouds. :-) Seriously, people seem to be in favor of it, but it's not a

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Fred L. Drake, Jr.
Shane Hathaway writes: - You have to be careful not to use double quotes in expressions. (Ampersands and less-than/greater-than signs are tricky too. Watch out for pairs of hyphens!) This is FUD. TAL can handle these things quite well; the problem is that many web developers don't have

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Jim Penny
On Tue, 29 Jul 2003 16:43:21 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: [Paul Winkler] I guess I don't understand the goal. Are we trying to make it so that zpt authors don't have to know any python? [Chris Withers] For me, that would be ideal... [Paul Winkler] I really think that's

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Shane Hathaway
Fred L. Drake, Jr. wrote: Shane Hathaway writes: - You have to be careful not to use double quotes in expressions. (Ampersands and less-than/greater-than signs are tricky too. Watch out for pairs of hyphens!) This is FUD. TAL can handle these things quite well; the problem is that many

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Paul Winkler
On Tue, Jul 29, 2003 at 09:26:07PM +0100, Christopher Boomer wrote: The only problem I ever have in this area is knowing when something is too complicated for TAL, and moving that boundary will not help. In particular, expanding the size of the overlapping gray area will not help. Often I

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Shane Hathaway
Jim Penny wrote: Frankly, would not even have occurred to me - I would probably create a tiny Script (Python) en passant, and called it directly, as: a tal:attributes=href python: here.url_quote(some_url) /. I did not realize that this is deprecated in Zope3. Your example relies on implicit

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Fred L. Drake, Jr.
Shane Hathaway writes: I'm not quite sure what you're saying. The following fails compilation: span tal:content=python: abc / That's because you've broken the syntax. It should have been: span tal:content=python: quot;abcquot; / or, more legibly, span tal:content=python:

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Evan Simpson
Jim Penny wrote: But, what does all of this have to do with index:, key:, int:, etc.? index: and key: are particularly interesting, in that they use different syntax for something that python conflates syntactically. That is, an integer indexed reference looks exactly like a string indexed

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Paul Winkler
On Tue, Jul 29, 2003 at 04:43:21PM -0400, Shane Hathaway wrote: Python expressions won't be banned. I will never consider them discouraged for all cases, either. There will always be a need for constructs like: div tal:condition=python: a == b.../div div tal:condition=python: (a and b)

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Jim Penny
On Tue, 29 Jul 2003 17:04:46 -0500 Evan Simpson [EMAIL PROTECTED] wrote: Jim Penny wrote: But, what does all of this have to do with index:, key:, int:, etc.? index: and key: are particularly interesting, in that they use different syntax for something that python conflates syntactically.

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Jim Penny
On Tue, 29 Jul 2003 17:51:56 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: Jim Penny wrote: Frankly, would not even have occurred to me - I would probably create a tiny Script (Python) en passant, and called it directly, as:a tal:attributes=href python: here.url_quote(some_url) /. I did

Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Richard Jones
On Wed, 30 Jul 2003 06:16 am, Evan Simpson wrote: OK, I've checked in a sample implementation on evan-pathprefix-branch. It allows for registering prefixes with: This seems very nice. I'm not likely to actually have a chance to play with it any time soon though, so I can't really comment on