openmath/convert_pickle.py
def OMList(self, l):
        """
        Convert a list of OM objects into an OM object

        EXAMPLES::

            >>> from openmath import openmath as om
            >>> from openmath.convert_pickle  import PickleConverter
            >>> converter = PickleConverter()
            >>> o = converter.OMList([om.OMInteger(2), om.OMInteger(2)]); o
            OMApplication(elem=OMSymbol(name='list', cd='Python', id=None, cdbase='http://python.org/'),
                     arguments=[OMInteger(integer=2, id=None),
                                OMInteger(integer=2, id=None)],
                     id=None, cdbase=None)
            >>> converter.to_python(o)
            [2, 2]
        """
        # Except for the conversion of operands, this duplicates the default
        # implementation of python's list conversion to openmath in py_openmath
        return om.OMApplication(elem=om.OMSymbol(cdbase=self._cdbase, cd='Python', name='list', ), arguments=l)
def OMList(self, l):
        """
        Convert a list of OM objects into an OM object

        EXAMPLES::

            >>> from openmath import openmath as om
            >>> from openmath.convert_pickle  import PickleConverter
            >>> converter = PickleConverter()
            >>> o = converter.OMList([om.OMInteger(2), om.OMInteger(2)]); o
            OMApplication(elem=OMSymbol(name='list', cd='Python', id=None, cdbase='http://python.org/'),
                     arguments=[OMInteger(integer=2, id=None),
                                OMInteger(integer=2, id=None)],
                     id=None, cdbase=None)
            >>> converter.to_python(o)
            [2, 2]
        """
        # Except for the conversion of operands, this duplicates the default
        # implementation of python's list conversion to openmath in py_openmath
        return om.OMApplication(elem=om.OMSymbol(cdbase=self._cdbase, cd='Python', name='list', ), arguments=l)
Convert a list of OM objects into an OM object

        EXAMPLES::

            >>> from openmath import openmath as om
            >>> from openmath.convert_pickle  import PickleConverter
            >>> converter = PickleConverter()
            >>> o = converter.OMList([om.OMInteger(2), om.OMInteger(2)]); o
            OMApplication(elem=OMSymbol(name='list', cd='Python', id=None, cdbase='http://python.org/'),
                     arguments=[OMInteger(integer=2, id=None),
                                OMInteger(integer=2, id=None)],
                     id=None, cdbase=None)
            >>> converter.to_python(o)
            [2, 2]