[Zodb-checkins] CVS: Zope3/src/zope/interface - pyskel.py:1.3

Stephan Richter srichter at cbu.edu
Thu Jun 5 18:53:29 EDT 2003


Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv6805/zope/interface

Modified Files:
	pyskel.py 
Log Message:
Updated pyskel.py to reflect recent changes:

- Use implements() instead of __implements__

- Removed commented out code generation print statement. We have not used 
  them for many months now, so that I can safely remove them.


=== Zope3/src/zope/interface/pyskel.py 1.2 => 1.3 ===
--- Zope3/src/zope/interface/pyskel.py:1.2	Wed Dec 25 09:13:42 2002
+++ Zope3/src/zope/interface/pyskel.py	Thu Jun  5 17:53:28 2003
@@ -55,11 +55,6 @@
                                   isinstance(ades[1], Attribute),
                                   namesAndDescriptions)
 
-    # if namesAndDescriptions and print_iface:
-    #     print
-    #     print "    ######################################"
-    #     print "    # from:", name
-
     for aname, ades in namesAndDescriptions:
         if isinstance(ades, Method):
             sig = ades.getSignatureString()[1:-1]
@@ -68,10 +63,6 @@
             print
             print "    def %s(%s):" % (aname, sig)
             print '        "See %s"' % name
-            # print
-            # print
-            # print "    %s.__doc__ = '%%s\\n\\n%%s' %% (%s['%s'].__doc__, %s.__doc__" % (
-            #     aname, top.__name__, aname, aname)
 
         elif isinstance(ades, Attribute):
             print
@@ -91,22 +82,16 @@
     class_name = iface.__name__
     if class_name.startswith('I'):
         class_name = class_name[1:]
+    print "from zope.interface import implements"
     print "from %s import %s" % (iface.__module__, iface.__name__)
     print
     print "class %s:" %class_name
     print "    __doc__ = %s.__doc__" % iface.__name__
     print
-    print "    __implements__ = ", iface.__name__
+    print "    implements(%s)" %iface.__name__
     print
-    # print "    ############################################################"
-    # print "    # Implementation methods for interface"
-    # print "    #", name
 
     rskel(iface, iface, 0)
-
-    # print
-    # print "    #"
-    # print "    ############################################################"
 
 
 def resolve(name, _silly=('__doc__',), _globals={}):




More information about the Zodb-checkins mailing list