On Nov 8, 2007, at 3:23 PM, Philip Jenvey wrote:
> > > On Nov 8, 2007, at 1:48 PM, Ben Bangert wrote: > >> On Nov 8, 2007, at 1:04 PM, Mike Orr wrote: >>> I'm all for fail-safe solutions with implementations that users can >>> understand and verify they're correct. The @generator looks like >>> the >>> best compromise. The _buffet is also straightforward though ugly. >>> >>> What would the overhead be of creating a context object for all >>> requests? That would avoid the ugly decorator. There's no >>> reason we >>> can't require users to call 'self.render' instead of 'render' if it >>> streamlines the implementation and fixes a design bug. > > It's probably going to be pretty small overhead, constructing a > simple class isn't too much more than creating a new dictionary. > What'd be odd about doing this for every request is that'd we'd > always sort of be publishing two APIs for doing the same thing. Do we > want that? > > I should make it clear that @generator also turns the call into a > generator as I said, in terms of code that means instead of having to > do: > > def yieldstuff(self): > def mygenerator(): > yield 'hello' > return mygenenrator() > > (like you currently have to do now), that turns into: > > @generator > def yieldstuff(self): > yield 'hello' Oh duh, this totally isn't necessary (woops thanks Ben) -- Philip Jenvey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
