Made some commands sensible to the new form of obj.typeclass (it's not a typeclass instance, not a class). Changed the way TypedObject.swap_typeclass works, so as to properly manage failures.

This commit is contained in:
Griatch 2011-10-03 23:53:23 +02:00
parent c8b4f7518d
commit 2c4af9076d
4 changed files with 46 additions and 23 deletions

View file

@ -36,6 +36,7 @@ class MetaTypeClass(type):
Adds some features to typeclassed objects
"""
super(MetaTypeClass, mcs).__init__(*args, **kwargs)
mcs.typename = mcs.__name__
mcs.path = "%s.%s" % (mcs.__module__, mcs.__name__)
def __str__(cls):