Ignore:
Timestamp:
Jun 14, 2005, 11:48:02 AM (19 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
bb3e2b01b8b571e1ce0e1df85bcb71fb0ccb8e9d
Parents:
50225ad7ef398575b5988f3bb049c8b508002f04
Message:
*bricken: having even more fun


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

Legend:

Unmodified
Added
Removed
  • modules/openmathserver/objects.py

    r50225a r9a95b3  
    1111        except AttributeError:
    1212            try:
    13                 return self.children
     13                return self.__children
    1414            except AttributeError:
    1515                return []
     
    2020        except AttributeError:
    2121            try:
    22                 del self.children
     22                del self.__children
    2323            except AttributeError:
    2424                pass
     
    2727            self.setChildren(children)
    2828        except AttributeError:
    29                 self.children=children
     29                self.__children=children
    3030    def __getBody(self):
    3131        try:
     
    3333        except AttributeError:
    3434            try:
    35                 return self.body
     35                return self.__body
    3636            except AttributeError:
    3737                return None
     
    4242        except AttributeError:
    4343            try:
    44                 del self.body
     44                del self.__body
    4545            except AttributeError:
    4646                pass
     
    4949            self.setBody(body)
    5050        except AttributeError:
    51                 self.body=body
     51                self.__body=body
    5252    children=property(__getChildren, __setChildren,__delChildren,\
    5353                      """ children in an OMtree""")
     
    5757        try:
    5858            attr=self.XMLAttributes()
    59             attrstr=" ".join([a.encode(context) for a in attr])
     59            attrstr=" "+" ".join([a.encode(context) for a in attr])
    6060        except:
    6161            attrstr=""
    62         opening="".join(["<", self.xmltag, " ", attrstr,">"])
     62        opening="".join(["<", self.XMLtag, attrstr,">"])
    6363        children=self.children
    6464        if children:
     
    6868            if not body:
    6969                body=""
    70             body=context.xmlEncodeBody(body)
    71         closing="".join(["</"+self.xmltag+">"])
     70            assert body!=None
     71            body=context.XMLEncodeBody(body)
     72            assert body!=None
     73        closing="".join(["</"+self.XMLtag+">"])
    7274        return "".join([opening,body,closing])
    7375class OMvar(OMobject):
     
    136138    def setBody(self, value):
    137139        raise OperationNotPossibleError
     140    XMLtag="OMI"
    138141class OMfloat(SimpleValue):
    139142    def __init__(self,value):
     
    182185    i=OMint(22482489)
    183186    print i.body
    184     i.body="dshj"
     187    print i.XMLencode(context)
     188    #i.body="dshj"
    185189   
Note: See TracChangeset for help on using the changeset viewer.