[Python-checkins] python/dist/src/Demo/newmetaclasses Eiffel.py,1.3,1.4
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Thu, 11 Jul 2002 14:17:29 -0700
Update of /cvsroot/python/python/dist/src/Demo/newmetaclasses
In directory usw-pr-cvs1:/tmp/cvs-serv24494
Modified Files:
Eiffel.py
Log Message:
move make_eiffel_method() out of base metaclass
Index: Eiffel.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/newmetaclasses/Eiffel.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Eiffel.py 11 Jul 2002 21:14:14 -0000 1.3
--- Eiffel.py 11 Jul 2002 21:17:26 -0000 1.4
***************
*** 28,31 ****
--- 28,38 ----
convert_methods = classmethod(convert_methods)
+ class EiffelMetaClass1(EiffelBaseMetaClass):
+ # an implementation of the "eiffel" meta class that uses nested functions
+
+ def __new__(meta, name, bases, dict):
+ meta.convert_methods(dict)
+ return super(EiffelMetaClass1, meta).__new__(meta, name, bases, dict)
+
def make_eiffel_method(func, pre, post):
def method(self, *args, **kwargs):
***************
*** 43,53 ****
make_eiffel_method = staticmethod(make_eiffel_method)
-
- class EiffelMetaClass1(EiffelBaseMetaClass):
- # an implementation of the "eiffel" meta class that uses nested functions
-
- def __new__(meta, name, bases, dict):
- meta.convert_methods(dict)
- return super(EiffelMetaClass1, meta).__new__(meta, name, bases, dict)
class EiffelMethodWrapper:
--- 50,53 ----