Commit 399c72af authored by Michel Pelletier's avatar Michel Pelletier

Fixed klass.__name__ bug, removed interface registry hack.

parent cbc76db2
......@@ -7,7 +7,7 @@ class Interface:
__extends__=()
def __init__(self, klass):
def __init__(self, klass, name=None):
# Creates an interface instance given a python class.
# the class describes the inteface; it contains
# methods, arguments and doc strings.
......@@ -17,8 +17,12 @@ class Interface:
#
# The base interfaces are deduced from the __extends__
# attribute.
self.name=klass.__dict__['__name__']
if name is not None:
self.name = name
else:
self.name=klass.__name__
self.doc=klass.__doc__
if hasattr(klass,'__extends__'):
self.extends=klass.__extends__
......
......@@ -83,9 +83,7 @@
#
##############################################################################
## This sucks, but we'll do it for now.
## "No sir I don't like it, not one bit."
import InterfaceInterface
Registered_Interfaces = Interface.Registered_Interfaces
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment