On Fri, 2012-03-30 at 07:11 -0700, Wyatt Baldwin wrote:
> On Friday, March 30, 2012 2:28:35 AM UTC-7, Chris McDonough wrote:
>         On Fri, 2012-03-30 at 09:09 +0100, Chris Withers wrote:
>          
>         > Can the registry be used for simple key value pairs or is it
>         only for 
>         > component registrations?
>         
>         pyramid.registry.Registry (the default registry type) indeed
>         supports
>         registry['foo'] = 'bar'.  You can also just do registry.foo =
>         'bar'.
>         We're all adults here ;)
>         
> So, is it *better* to store application globals (e.g., a database
> session factory) in the registry or in registry.settings? Using the
> registry directly makes more sense to me, but I don't think I've seen
> this recommended anywhere.

Really doesn't matter.  If you ever intend to use a "bare" ZCA registry
(e.g. you want to share a registry with like Zope or something), it
doesn't have __getitem__ or __setitem__, but if you never intend to use
one, it's fine to use these.

- C


> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "pylons-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pylons-discuss/-/lYZ6TaMXlIMJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to pylons-discuss
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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-discuss?hl=en.

Reply via email to