(original) (raw)


On 30 May 2013 06:25, "Brett Cannon" <brett@python.org> wrote:
\>
\> On Wed, May 29, 2013 at 2:56 PM, R. David Murray <rdmurray@bitdance.com> wrote:
\> > On Wed, 29 May 2013 20:10:44 +0200, Antoine Pitrou <solipsis@pitrou.net> wrote:
\> >> On Wed, 29 May 2013 12:55:01 -0400
\> >> Brett Cannon <brett@python.org> wrote:
\> >> > > Perhaps 'managed\_module'?
\> >> >
\> >> > managed\_module is better than managed\_initialization.
\> >>
\> >> I don't understand how it's "managed". "manage", "manager", etc. is the
\> >> kind of dumb words everybody uses when they don't manage (!) to explain
\> >> what they're talking about.
\> >>
\> >> My vote is for "module\_to\_init", "uninitialized\_module",
\> >> "pristine\_module", etc.
\>
\> I don't like unititionalized\_module or pristine\_module as that isn't
\> guaranteed thanks to reloading; seems misleading.
\>
\> >
\> > Actually, you are right, 'managed\_module' isn't much if any better
\> > than those.
\> >
\> > Our problem is that there are two concepts we are trying to cram into
\> > one name: what the context manager is managing, and the object that the
\> > context manager gives you on entry to the with block. �There probably
\> > isn't a good answer.
\> >
\> > I suppose that one approach would be to have a module\_initializer context
\> > manager return self and then separately call a method on it it to actually
\> > load the module inside the with body. �But adding more typing to solve
\> > a naming issue seems...odd.
\>
\> That would make me feel icky, so I won't do it.
\>
\> So module\_to\_init it is unless someone can convince me the bikeshed is
\> a different colour.

+1 to that bikeshed colour. It covers what we're returning (a module) and what we plan to do with it that needs a with statement (initialising it).

Cheers,
Nick.

> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\> Python-Dev mailing list
\> Python-Dev@python.org
\> http://mail.python.org/mailman/listinfo/python-dev
\> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com