Ignore:
Timestamp:
Jun 15, 2005, 1:50:16 PM (18 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'a7324b6e0b44a1a8ed3fa4d9ca3e2ff210ddd52c')
Children:
01cd17fd67cfda8867350bb5007624dde10be224
Parents:
04f6a4e219c5180c44ff638afd7e63cc8ffa3699
Message:
*bricken: refactoring


git-svn-id: file:///usr/local/Singular/svn/trunk@8370 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/openmathserver/objects.py

    r04f6a4 r1667822  
    105105        closing="".join(["</"+self.XMLtag+">"])
    106106        return "".join([opening,body,closing])
    107 class OMvar(OMObjectBase):
     107class OMVar(OMObjectBase):
    108108    def __init__(self,name):
    109         super(OMvar,self).__init__()
     109        super(OMVar,self).__init__()
    110110        self.name=name
    111111    def evaluate(self,context):
     
    142142        raise UnsupportedOperationError
    143143       
    144 class OMsymbol(OMObjectBase):
     144class OMSymbol(OMObjectBase):
    145145    def __init__(self,name,cd=None):
    146         super(OMsymbol,self).__init__()
     146        super(OMSymbol,self).__init__()
    147147        self.cd=cd
    148148        self.name=name
     
    206206    def getXMLattributes(self):
    207207        return [XMLattribute("dec",str(self.value))]
    208 class OMref(OMObjectBase):
     208class OMRef(OMObjectBase):
    209209    def __init__(self, ref):
    210210        self.ref=ref
     
    225225    context["x"]=OMint(1)
    226226
    227     x=OMvar("x")
    228 
    229     y=OMvar("y")
     227    x=OMVar("x")
     228
     229    y=OMVar("y")
    230230
    231231    print context.evaluate(x)
    232232    print context.evaluate(y)
    233     firstArg=OMbinding(lambdasym,[OMvar("x"), OMvar("y")], OMvar("x"))
     233    firstArg=OMbinding(lambdasym,[OMVar("x"), OMVar("y")], OMVar("x"))
    234234    #print context.evaluate(firstArg)
    235235    application=OMapplication(firstArg, [x,y])
     
    242242    #application=OMapplication(arith1.plussym,[x])
    243243    #application=OMapplication(arith1.plussym,[x,x])
    244     application=OMapplication(OMsymbol("plus",arith1.content),[x,x])
     244    application=OMapplication(OMSymbol("plus",arith1.content),[x,x])
    245245   
    246246    print context.evaluate(application)
    247     application=OMapplication(OMsymbol("plus",arith1.content),[x,x,x])
     247    application=OMapplication(OMSymbol("plus",arith1.content),[x,x,x])
    248248   
    249249    print context.evaluate(application)
Note: See TracChangeset for help on using the changeset viewer.