Changeset e93f7b in git
- Timestamp:
- Jun 24, 2005, 11:19:15 AM (18 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- d4cf20d0bbfa138f5d9a3a6458142a06af15604e
- Parents:
- 07bc1d47f12529a6b8f7b7692dc0998bae8e5f4d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/openmathserver/arith1.py
r07bc1d re93f7b 1 from binding import * 2 from context import * 3 from objects import * 4 from cd import * 5 from omexceptions import * 1 "Implementation of arith1 content dictionary" 2 from objects import OMSymbol 3 from cd import OMCD, OMCDImplementation 4 #from omexceptions import * 6 5 7 content =OMCD("arith1")8 implementation =OMCDImplementation(content)6 content = OMCD("arith1") 7 implementation = OMCDImplementation(content) 9 8 10 plussym =OMSymbol("plus",content)9 plussym = OMSymbol("plus", content) 11 10 12 11 def plusfunc(context, *args): 12 "tries, convert to generic and adding" 13 13 #print "plusfunc", args 14 args =[context.toGeneric(o) for oin args]15 if len(args) ==0:14 args = [context.toGeneric(omobj) for omobj in args] 15 if len(args) == 0: 16 16 return content.package(0) 17 17 else: 18 erg =args[0]19 for i in xrange(1, len(args)):20 erg =erg+args[i]18 erg = args[0] 19 for i in xrange(1, len(args)): 20 erg = erg+args[i] 21 21 return erg 22 22 implementation.implement("plus", plusfunc)
Note: See TracChangeset
for help on using the changeset viewer.