On Jan 17, 2008 1:36 PM, Ben Bangert <[EMAIL PROTECTED]> wrote:
> On Jan 17, 2008, at 12:21 PM, Mike Orr wrote:
> > I wasn't planning to support the other dict methods, but maybe we
> > could.
> > If we just say that url_for.routes is a dict of routes by name (as I
> > was planning
> > to implement), that would do the same.  Otherwise if we
> > offered .items(), what
> > would the values be?
>
> The values would be the Route objects, assuming there is still route
> objects in Routes 2. I had generally assumed there would be, since
> there needs to be something to hold onto the various options for each
> connected route, and how to generate it.

Yes, there will have to be Route objects to hold the match regex and
generation template, a list of path variables and a dict of extra
variables, and the .match() and .generate() methods for the route.

The redirect and failure routes may or may not be distinct class(es).
That's one reason not to expose the route constructor directly.

I'm just not sure we should give .items() and .values() access to the
route objects because they're not public, and somebody who really
wants them can go to the .routes dict themself.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to