From: Oleg B. <ph...@ph...> - 2004-12-28 10:05:11
|
On Fri, Dec 24, 2004 at 11:26:56PM +0200, Ksenia Marasanova wrote: > I changed the name of Employee class to Author. This is the most weird > part of it... if you change it back to Employee than it works!! Does > it have to do something with Python / Postgres reserved keywords?! Not at all. The magic is in the order of registry keys. Registry is a dictionary, and Python handles dictionary's keys in a random order: >>> print {"Author": 1, "Person": 1, "Retired": 1}.keys() ['Person', 'Retired', 'Author'] >>> print {"Employee": 1, "Person": 1, "Retired": 1}.keys() ['Employee', 'Person', 'Retired'] This cause the internal loop that builds the list of parent classes to behave differently. This is a bug, of course, and I'm continuing hunting for it. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |