On Sat, Jan 15, 2011 at 7:23 PM, Alice Bevan–McGregor
<al...@gothcandy.com> wrote:
> On 2011-01-15 04:07:24 -0800, Alessandro Molina said:
>
>> I'm really new to pyramid, so I might be wrong, but probably something
>> like that can be quickly achieved by implementing your Controller base class
>> on Pyramid overridding the __getitem__ method to use for example Crank.
>
> Unless someone can correct me, the __lookup__ functionality (of consuming
> multiple path elements) can't be implemented using __getitem__ — the only
> option there is recursive descent.

You can do __getitem__ trickery to pull multiple elements off of the
path (wrap and return an object with information about it's parrent,
and it's own __getitem__.   But, it is somewhat complicated,
partiularly in the case where you don't know the number of path
elements you're going to need, but it *can* be done without resorting
to overriding the dispatcher.

--Mark Ramm

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to