[Zope3-checkins] CVS: Zope3/src/zope/interface - interface.py:1.8
Jim Fulton
jim@zope.com
Mon, 14 Apr 2003 04:29:10 -0400
Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv6541
Modified Files:
interface.py
Log Message:
Cleaned up the Method implementation a little bit by avoiding some
unnecessary and confusing indirection. The Method implementation
could use a lot more cleanup.
=== Zope3/src/zope/interface/interface.py 1.7 => 1.8 ===
--- Zope3/src/zope/interface/interface.py:1.7 Thu Mar 6 15:46:53 2003
+++ Zope3/src/zope/interface/interface.py Mon Apr 14 04:29:09 2003
@@ -20,8 +20,6 @@
from inspect import currentframe
from types import FunctionType
-sig_traits = ['positional', 'required', 'optional', 'varargs', 'kwargs']
-
CO_VARARGS = 4
CO_VARKEYWORDS = 8
@@ -360,11 +358,12 @@
raise BrokenImplementation(self.interface, self.__name__)
def getSignatureInfo(self):
- info = {}
- for t in sig_traits:
- info[t] = getattr(self, t)
-
- return info
+ return {'positional': self.positional,
+ 'required': self.required,
+ 'optional': self.optional,
+ 'varargs': self.varargs,
+ 'kwargs': self.kwargs,
+ }
def getSignatureString(self):
sig = "("