From: Oleg B. <ph...@ph...> - 2004-11-30 13:05:16
|
On Mon, Nov 29, 2004 at 03:47:47PM -0600, Ian Bicking wrote: > > Well, there is a minor semantic difference. ._create() tests if all > >passed keywords arguments are actually columns. .set() does not test it. > >One can do self.set(noncolumn="value"), which results in assignment > >self.noncolumn="value", but can't do ATable(noncolumn="value"). > > > > Should we change the semantic of .set(), so it does not allow > >non-column keywords? In my opinion - yes, we should. > > Yes, it's just an oversight that it doesn't check them. Commited. This is a big change, so I spent more time testing it. I found I need a special treatment for inheritance. PS. Also I made a minor optimization: - extra = dict(filter(f_not_column, kw.items())) - kw = dict(filter(f_is_column, kw.items())) + items = kw.items() + extra = dict(filter(f_not_column, items)) + kw = dict(filter(f_is_column, items)) From time to time I will do some code cleanup and optimizations. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |