[Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to (original) (raw)
R. David Murray rdmurray at bitdance.com
Wed May 29 20:56:46 CEST 2013
- Previous message: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to
- Next message: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 29 May 2013 20:10:44 +0200, Antoine Pitrou <solipsis at pitrou.net> wrote:
On Wed, 29 May 2013 12:55:01 -0400 Brett Cannon <brett at python.org> wrote: > > Perhaps 'managedmodule'? > > managedmodule is better than managedinitialization.
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 "moduletoinit", "uninitializedmodule", "pristinemodule", etc.
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.
--David
- Previous message: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to
- Next message: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]