launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #03916
Re: warning: we will soon have much noise in the test results...
On Monday 26 July 2010 16:01:31 Jonathan Lange wrote:
> > I guess I'm struggling to see how @classmethod is useful then. In fact,
> > it's dangerous.
>
> Why do you think it's dangerous?
Because it allows someone to get hold of a new object that is not security
wrapped. I don't know why you'd ever want to do that.
> > FWIW I don't think this way of doing things is any better (nor worse,
> > though) than a utility class, is there a reason to avoid those?
>
> There are a few:
> * An IFooSet is a poorly defined object, that doesn't do a very good
> job of representing any actual thing in the system
That's not entirely correct - it's used to represent top-level collections in
the API.
> * It is actually more work and more boilerplate to have a second
> class implement IFooSet (type it out!)
From what I've seen it's marginal.
> * This extra work does not buy any meaningful separation of
> concerns. It's very normal to have code that creates an object
> together with the code that defines the behaviour of the object.
That I agree with :)
References