[Checkins] SVN: ExtensionClass/trunk/ MethodObject seems like another ExtensionClass-ism that can be packaged with it.

Philipp von Weitershausen philikon at philikon.de
Tue Jun 5 09:25:50 EDT 2007


Log message for revision 76370:
  MethodObject seems like another ExtensionClass-ism that can be packaged with it.
  

Changed:
  A   ExtensionClass/trunk/README.txt
  U   ExtensionClass/trunk/setup.py
  _U  ExtensionClass/trunk/src/

-=-
Added: ExtensionClass/trunk/README.txt
===================================================================
--- ExtensionClass/trunk/README.txt	                        (rev 0)
+++ ExtensionClass/trunk/README.txt	2007-06-05 13:25:49 UTC (rev 76370)
@@ -0,0 +1,30 @@
+ExtensionClass and ExtensionClass-related packages
+==================================================
+
+ExtensionClass
+--------------
+
+This package provides a metaclass that allows classes implemented in
+extension modules to be subclassed in Python.  Unless you need
+ExtensionClasses for legacy applications (e.g. Zope 2), you probably
+want to use Python's new-style classes (available since Python 2.2).
+
+ComputedAttribute
+-----------------
+
+This package provides a way to attach attributes to an
+``ExtensionClass`` or instance that are computed by calling a
+callable.  This works very much like ``property`` known from new-style
+classes, except that a ``ComputedAttribute`` can also be attached to
+an instance and that it honours ExtensionClass semantics (which is
+useful for retaining Acquisition wrappers, for example).
+
+MethodObject
+------------
+
+This package lets you attach additional "methods" to ExtensionClasses.
+These "methods" are actually implemented by subclassing the
+``MethodObject.Method`` class and implementing the ``__call__`` method
+there.  Instances of those classes will be bound to the instances
+they're attached to and will receive that instance object as a first
+parameter (after ``self``).


Property changes on: ExtensionClass/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: ExtensionClass/trunk/setup.py
===================================================================
--- ExtensionClass/trunk/setup.py	2007-06-05 13:22:42 UTC (rev 76369)
+++ ExtensionClass/trunk/setup.py	2007-06-05 13:25:49 UTC (rev 76370)
@@ -23,11 +23,7 @@
       description='Metaclass for subclassable extension types',
       author='Zope Corporation and Contributors',
       author_email='zope-dev at zope.org',
-      long_description="""\
-This package provides a metaclass that allows classes implemented in
-extension modules to be subclassed in Python.  Unless you need
-ExtensionClasses for legacy applications (e.g. Zope 2), you probably
-want to use Python's new-style classes (available since Python 2.2).""",
+      long_description=open('README.txt').read(),
 
 	  packages=find_packages('src'),
 	  package_dir={'': 'src'},
@@ -40,6 +36,10 @@
                              [os.path.join('src', 'ComputedAttribute',
                                            '_ComputedAttribute.c')],
                              include_dirs=['src']),
+                   Extension("MethodObject._MethodObject",
+                             [os.path.join('src', 'MethodObject',
+                                           '_MethodObject.c')],
+                             include_dirs=['src']),
                    ],
       include_package_data=True,
       zip_safe=False,


Property changes on: ExtensionClass/trunk/src
___________________________________________________________________
Name: svn:externals
   - ExtensionClass		svn://svn.zope.org/repos/main/Zope/trunk/lib/python/ExtensionClass
ComputedAttribute	svn://svn.zope.org/repos/main/Zope/trunk/lib/python/ComputedAttribute

   + ExtensionClass		svn://svn.zope.org/repos/main/Zope/trunk/lib/python/ExtensionClass
ComputedAttribute	svn://svn.zope.org/repos/main/Zope/trunk/lib/python/ComputedAttribute
MethodObject		svn://svn.zope.org/repos/main/Zope/trunk/lib/python/MethodObject




More information about the Checkins mailing list