Hello all, I have encountered a strange problem: the tuple 'class.__bases__' has disappeared. It should be a Python defined variable, but it's gone... The problem manifested it self by trying to call 'manage_access()' of a Product I'm working on, which resulted in: Error Type: AttributeError Error Value: __bases__ in gather_permissions() in RoleManager. My class inherits (ObjectManager, PropertyManager, RoleManager, SimpleItem), which is basicly what a Folder inherits. A funny thing is that if I inherit Folder instead, the problem disappears. I also tried a method 'returnBases(self): return self.__bases__' of my class, and it does not work (results in the same error). Any clues? Best regards, jonas -- *************************************************************************** Jonas Juselius e-mail...: jonas@iki.fi voice....: +358 9 191 40188 P.O. Box 55/ Department of Chemistry GSM......: 040 506 6599 FIN-00014 University of Helsinki fax......: +358 9 191 40169 FINLAND http://www.iki.fi/jonas Home address: Helsinginkatu 16 B 42 tel......: +358 9 753 3369 00500 Helsinki FINLAND ***************************************************************************
Ok, sorry... I suddenly remembered something, __bases__ is not deined for instances, only for classes, so my method should read: 'returnBases(self): return self.__class__.__bases__' This works, but I still don't understand why 'manage_access' fails with an AttributeError... jonas On Thu, Aug 12, 1999 at 04:19:57PM +0300, Jonas Juselius wrote:
Hello all,
I have encountered a strange problem: the tuple 'class.__bases__' has disappeared. It should be a Python defined variable, but it's gone... The problem manifested it self by trying to call 'manage_access()' of a Product I'm working on, which resulted in:
Error Type: AttributeError Error Value: __bases__
in gather_permissions() in RoleManager.
My class inherits (ObjectManager, PropertyManager, RoleManager, SimpleItem), which is basicly what a Folder inherits. A funny thing is that if I inherit Folder instead, the problem disappears.
I also tried a method 'returnBases(self): return self.__bases__' of my class, and it does not work (results in the same error). Any clues?
Best regards, jonas
participants (1)
-
Jonas Juselius