I don't think you need to implement a new traverser you just need to provide a customized __getitem__ to be used by your users and handle all issues you described there. For example provide a decorator and introduce a NoRessource Exception and to be used instead of KeyError.
Though 'MultiTraverser' sounds like you already have replaced the default traverser? Arndt. To exacerbate this problem, I've developed something I call a MultiTraverser. Basically, it allows you to have wildcards in the URL fragments. This ends up with the traversal of a cartesian-product of resources over URL fragments (i.e, a single URL can end up hitting a lot of resources). Having resources randomly not present in my case because they accidentally raised a KeyError is a pretty fatal problem for my use case. A resource might be just one component in some data analysis - a component randomly not being there (because it is buggy and raises a KeyError accidentally) could easily be missed by a user and lead to incorrect results. > > It seems that if I want to make this reasonably fool-proof I have to > invent my own traverser. Any advice on that front? > > -- Arndt Droullier / Nive cms cms.nive.co -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
