super function doesn't work inside a maya python module
Posted
by sfjedi
on Stack Overflow
See other posts from Stack Overflow
or by sfjedi
Published on 2010-05-11T04:08:02Z
Indexed on
2010/05/11
4:14 UTC
Read the original article
Hit count: 286
Somehow, this works fine in the Maya/Python script editor, but fails when it's inside of my module code. Anyone have any ideas?
class ControlShape(object):
def __init__(self, *args, **kwargs):
print 'Inside ControlShape...'
class Cross(ControlShape):
def __init__(self, *args, **kwargs):
print 'Entering Cross...'
super(Cross, self).__init__(*args, **kwargs)
print 'Leaving Cross...'
x = Cross()
This gives me a TypeError: super(type, obj): obj must be an instance or subtype of type.
© Stack Overflow or respective owner