Ignore:
Timestamp:
Jun 24, 2005, 11:19:15 AM (18 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
d4cf20d0bbfa138f5d9a3a6458142a06af15604e
Parents:
07bc1d47f12529a6b8f7b7692dc0998bae8e5f4d
Message:
*bricken: beautified


git-svn-id: file:///usr/local/Singular/svn/trunk@8397 2c84dea3-7e68-4137-9b89-c4e89433aadc
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"
     2from objects import OMSymbol
     3from cd import OMCD, OMCDImplementation
     4#from omexceptions import *
    65
    7 content=OMCD("arith1")
    8 implementation=OMCDImplementation(content)
     6content = OMCD("arith1")
     7implementation = OMCDImplementation(content)
    98
    10 plussym=OMSymbol("plus",content)
     9plussym = OMSymbol("plus", content)
    1110
    1211def plusfunc(context, *args):
     12    "tries, convert to generic and adding"
    1313    #print "plusfunc", args
    14     args=[context.toGeneric(o) for o in args]
    15     if len(args)==0:
     14    args = [context.toGeneric(omobj) for omobj in args]
     15    if len(args) == 0:
    1616        return content.package(0)
    1717    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]
    2121    return erg
    2222implementation.implement("plus", plusfunc)
Note: See TracChangeset for help on using the changeset viewer.