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 :) _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

