E
Ethan Furman
Good Day!
I am stuck... hopefully a few fresh pairs of eyes will spot what I am
missing.
I have a metaclass, Traits, and two different testing files,
test_traits.py and tests.py. test_traits works fine, tests generates
the following error:
C:\Python31\Lib\site-packages\traits\tests>\python31\python tests.py
Traceback (most recent call last):
File "tests.py", line 4, in <module>
class TraitConflict(meta=Traits, traits=(BoxPrint, BigBoxPrint)):
TypeError: type() takes 1 or 3 arguments
Working code from test_traits.py:
class DerivedClass(metaclass=Traits, traits=(TBundle1, TBundle2)):
def repeat(yo, text, count):
print('whatever...')
def whatsit(yo, arg1):
print("calling baseclass's whatsit...")
print(super().whatsit(arg1))
Failing code from tests.py:
class TraitConflict(meta=Traits, traits=(BoxPrint, BigBoxPrint)):
def useless(yo):
print("this class won't compile")
Any clues or pointers *greatly* appreciated!
~Ethan~
I am stuck... hopefully a few fresh pairs of eyes will spot what I am
missing.
I have a metaclass, Traits, and two different testing files,
test_traits.py and tests.py. test_traits works fine, tests generates
the following error:
C:\Python31\Lib\site-packages\traits\tests>\python31\python tests.py
Traceback (most recent call last):
File "tests.py", line 4, in <module>
class TraitConflict(meta=Traits, traits=(BoxPrint, BigBoxPrint)):
TypeError: type() takes 1 or 3 arguments
Working code from test_traits.py:
class DerivedClass(metaclass=Traits, traits=(TBundle1, TBundle2)):
def repeat(yo, text, count):
print('whatever...')
def whatsit(yo, arg1):
print("calling baseclass's whatsit...")
print(super().whatsit(arg1))
Failing code from tests.py:
class TraitConflict(meta=Traits, traits=(BoxPrint, BigBoxPrint)):
def useless(yo):
print("this class won't compile")
Any clues or pointers *greatly* appreciated!
~Ethan~