[Zope3-dev] context/@@absolute_url

Guido van Rossum guido@python.org
Wed, 11 Dec 2002 11:47:52 -0500


> > > > > The '@@' bit means 'the following path segment is to be
> > > > > interpreted as the name of a view'. The '@@' looks a bit
> > > > > like a pair of comic-book eyes.
> > > > >
> > > > > So, this is just the same as 'views/absolute_url'.
> > > >
> > > > Then is there any reason not to use the latter?
> > > 
> > > As I recall the original discussion, one of the arguments in
> > > favor of the @@ notation was that it was (human) language
> > > nuetral.
> > 
> > This was in a snippet of Python code, not in a page template.
> > Python code is not human language neutral.
> 
> If you are refering to the bit in ComponentConfigItemEdit.pt that I
> checked int to a branch recently, then it was in a page template.

Sorry, you're right.  But I think in a page template the second form
should also be preferred.

> I copied the thingy/@@absolute_url idiom from a couple of lines
> down, where thingy was different from context.  I just didn't know
> enough about the meaning of @@ to replace it with views/absolute_url.

Fair enough.

--Guido van Rossum (home page: http://www.python.org/~guido/)