Code review comment for lp:~mbp/bzr/initialize

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Thu, 2011-03-31 at 08:15 +0000, Martin Pool wrote:
> > I like the idea, but I don't really see that we have to not use things
> > the way they are documented. In my test scripts, I certainly do:
> >
> > bzrlib.initialize().__enter__()
> >
> > So this does make things easier there.
> >
> > I'm not sure that it is perverse to ask people to use the api the way it
> > was designed. I suppose it is called 'initialize()' and not
> > 'get_initializer_context()'.
>
> It's really just the name I think doesn't go with the semantics. As
> you say if the name implied that it didn't actually do the
> initialization that would be ok.
>
> I wrote this out of annoyance at wondering why it wasn't initializing.
> (I did realize we had the state concept but I thought initialize
> automatically entered it.)
I've hit this too. Changing it or the name seems like a good idea. If
neither of us can predict what it does, then it'll be even stranger for
the other external users that should use this API.

Cheers,

Jelmer

« Back to merge proposal