[Grok-dev] Re: registering a factory as a (global) utility

Martin Aspeli optilude at gmx.net
Fri Apr 27 20:36:49 EDT 2007


Darryl Cousins wrote:
> Hi,
> 
> On Fri, 2007-04-27 at 21:03 +0200, Martijn Faassen wrote:
>> Hey,
>>
>> On 4/27/07, Luciano Ramalho <luciano at ramalho.org> wrote:
>>> On 4/27/07, Martijn Faassen <faassen at startifact.com> wrote:
>>>> Hey Martijn! It's me, Martijn! :)
> [snip]
>> It's not only useful for registering factories, so 'factory' I think
>> is out. :) nocall is an option.
>> What do others think about it?
> 
> +1 to nocall

Is the default going to be nocall=True?

In that case, you have to do nocall=False

This is a really awkward double negative. I'm not-not-calling. One of 
the big things that Alex Limi always rants about is that settings should 
always have "non-negated" names for usability.

I think if you take the name 'factory' more generally to mean "thing 
which returns something to be registered" then factory=True means "this 
is a callable (e.g. a class) which will return the thing you want", and 
only when factory=False do you get "the object as-is".

Martin



More information about the Grok-dev mailing list