Gustavo Narea schrieb: >> Btw, instead of using an extra function for evaluating predicates to >> booleans, can't the predicate interface be augmented with an additional >> method for that purpose? Or maybe even make it callable and the return >> value will be a boolean? > > Yes, that's one of the upcoming features of repoze.what. But still, for the > sake of convenience in TG2 applications, we need a TG2-specific function to > evaluate predicates because for a predicate to be evaluated you must pass at > least the environ as a parameter; if you don't use the function, you'll have > to pass the environ every time you evaluate the predicate.
My idea was to let TG2 provide a request-aware sublass of the Predicate class where the environ parameter is optional and set to request.environ if not specified. TG2 could also monkey-patch the original Predicate class or use the plugin-mechanism to somehow make repoze.what aware of the global request object. -- Christoph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
