Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion configuration and registries

Received: by 10.50.217.193 with SMTP id pa1mr1407149igc.1.1333126247649;
        Fri, 30 Mar 2012 09:50:47 -0700 (PDT)
X-BeenThere: pylons-discuss@googlegroups.com
Received: by 10.50.184.170 with SMTP id ev10ls1982817igc.1.gmail; Fri, 30 Mar
 2012 09:50:43 -0700 (PDT)
Received: by 10.50.188.232 with SMTP id gd8mr1398168igc.4.1333126243260;
        Fri, 30 Mar 2012 09:50:43 -0700 (PDT)
Received: by 10.50.188.232 with SMTP id gd8mr1398166igc.4.1333126243250;
        Fri, 30 Mar 2012 09:50:43 -0700 (PDT)
Return-Path: <chr...@plope.com>
Received: from cabana.palladion.com (cabana.palladion.com. [64.34.177.88])
        by gmr-mx.google.com with ESMTPS id a39si4134400qch.0.2012.03.30.09.50.42
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 30 Mar 2012 09:50:42 -0700 (PDT)
Received-SPF: neutral (google.com: 64.34.177.88 is neither permitted nor denied by best guess record for domain of chr...@plope.com) client-ip=64.34.177.88;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 64.34.177.88 is neither permitted nor denied by best guess record for domain of chr...@plope.com) smtp.mail=chr...@plope.com
Received: from [192.168.1.146] (ip72-209-213-54.dc.dc.cox.net [72.209.213.54])
	(using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by cabana.palladion.com (Postfix) with ESMTP id B9C8F1CC7EF
	for <pylons-discuss@googlegroups.com>; Fri, 30 Mar 2012 10:33:27 -0400 (EDT)
Subject: Re: configuration and registries
From: Chris McDonough <chr...@plope.com>
To: pylons-discuss@googlegroups.com
In-Reply-To: <25775970.2281.1333116660379.JavaMail.geo-discussion-forums@pbjk8>
References: <4F756A38.4060507@simplistix.co.uk>
	 <1333099715.2980.6.camel@thinko>
	 <25775970.2281.1333116660379.JavaMail.geo-discussion-forums@pbjk8>
Content-Type: text/plain; charset="UTF-8"
Date: Fri, 30 Mar 2012 12:50:50 -0400
Message-ID: <1333126250.2980.10.camel@thinko>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit

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 pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to pylons-discuss
> +unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.