From: Ian B. <ia...@co...> - 2004-09-22 15:11:49
|
Oleg Broytmann wrote: > Hello. > > On Wed, Sep 22, 2004 at 01:13:35AM -0500, Ian Bicking wrote: > >>To fetch objects from the database, use MyClass.get(id) (instead of >>MyClass(id)). To create/insert objects, use MyClass(col=value, ...) >>(instead of MyClass.new(col=value, ...)). > > > I alway wanted to know - why?! Why not MyClass.get(id) and > MyClass.new(**values)? Mostly so that it looks like other classes, where you create an object with MyClass(...). The underlying code was a bit more complicated too, which made me feel like I was going out of my way to do things backwards. Ian |