I am using python language for Squish Automation Tool. This tool extends python with some custom objects and functions. This is what they say in the manual:
Squish's Python-specific extension modules are loaded automatically by internally executing the equivalent of the following statements:
Python import test import testData import object import objectMap import squishinfo from squish import *
This means that it is not necessary to import them yourself unless you are developing your own standalone module.
By doing so they redefine object
automatically (to this), so my attempts to do the New-Style Classes (like class NewClass(object):
) throw me an error:
TypeError: Error when calling the metaclass bases.
module.__init__()
takes at most 2 arguments (3 given)
So I'm trying to get the object
back.
After reading the amazing article about metaclasses I'm trying to get the object
with the following code:
class OrigObject:
__metaclass__ = type
class NewClass(OrigObject):
pass
My question is: is that the same as inheriting from the original object
class?
UPDATE: I'm limited to use the Python 2.4 (if that matters)
Thanks!