Comment 5 for bug 636193

Revision history for this message
Benji York (benji) wrote : Re: [Bug 636193] Re: feature flags need to self document

On Wed, Jan 5, 2011 at 6:05 PM, Martin Pool <email address hidden> wrote:
> They are not registered at the moment, and to fix this bug they need to
> be.  There are of course various ways to do this in Python.  One that I
> was thinking of was:
>
>  * register them centrally
>  * refer to them just by string name
>  * raise an error or a warning if a name is used that was not previously registered

For flag names that's the approach I was favoring.

> Does Launchpad already have a Registry concept like in bzr, or is there
> a Zope idiom we should use?

Yep, the Zope component architecture can be used as a general registry
like this. When I want a registry of callable things the ZCA is where
I start.

The scopes registry will need to be a little more complicated, but it
won't be too bad.

> Please request a review from me (but don't block on getting an answer),
> and feel free to ping me if you want to talk.

Will do.
--
Benji York