I'm not sure why you would even consider the second option if the first works. The set_property functionality is for lazily computing properties to avoid the cost. If you already have objInstance then you aren't being lazy anymore.
On Thu, Mar 24, 2016 at 3:26 PM, Jonathan Vanasco <[email protected]> wrote: > I need to add a non-callable object to a request instance > > which is more correct? > > request.foo = objInstance > request.set_property(lambda x: objInstance, 'foo') > > > usually i'd use add_request_method on the config, but this is for a single > view > > -- > 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 https://groups.google.com/group/pylons-discuss. > For more options, visit https://groups.google.com/d/optout. > -- 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 https://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
