You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> converter.to_python( decoder.decode_bytes( b"<OMA><OMS cdbase=\"http://www.openmath.org/cd\" cd=\"interval1\" name=\"integer_interval\"/><OMI>1</OMI><OMI>4</OMI></OMA>", snippet=True ) )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/openmath/convert.py", line 146, in to_python
elem = self.to_python(omobj.elem)
File "/usr/local/lib/python3.8/dist-packages/openmath/convert.py", line 143, in to_python
return self._lookup_to_python(omobj.cdbase, omobj.cd, omobj.name)
File "/usr/local/lib/python3.8/dist-packages/openmath/convert.py", line 133, in _lookup_to_python
raise ValueError("no entry found")
ValueError: no entry found
>>>
This should be converted to Python as range(1,5)
OpenMath integer_interval is already supported by the OpenMath implementations of Gap, Macaulay2, Ruby, Yacas, and range in the standard library of Python without importing anything
The text was updated successfully, but these errors were encountered:
tkw1536
added a commit
to KWARC/py-openmath
that referenced
this issue
May 21, 2020
This issue adds translation for the range() class to the
DefaultConverter. Note that a python range(start, stop) does not include
the value of stop, whereas the 'integer_interval' symbol does. The
converter thus has to add or subtract one.
FixesOpenMath#29.
This should be converted to Python as
range(1,5)
OpenMath
integer_interval
is already supported by the OpenMath implementations of Gap, Macaulay2, Ruby, Yacas, andrange
in the standard library of Python without importing anythingThe text was updated successfully, but these errors were encountered: