Two things MathS.ToSympyCode does with a binder, found while checking that the new forms in #976 export. Both are on master at 34f72d11 and neither is new — they reproduce with ordinary names.
1. A lambda exports with no body
MathS.ToSympyCode("lambda(x, x + 1)".ToEntity())
import sympy
x = sympy.Symbol('x')
expr = sympy.Lambda(x, )
sympy.Lambda(x, ) is a SyntaxError, so the generated file does not run. The body is simply not emitted.
2. A set builder throws
MathS.ToSympyCode("{ x : x > 0 }".ToEntity())
AngouriBugException: The given domain is not presented in those possible
please report about it to the official repository
Reporting it, as instructed. A ConditionalSet reaches the exporter's domain switch with something the switch does not list; the natural export is sympy.ConditionalSet(x, x > 0, S.Complexes) or a Set comprehension.
Both are the export layer only — the entities themselves are fine, print correctly, and round-trip through the parser.
Two things
MathS.ToSympyCodedoes with a binder, found while checking that the new forms in #976 export. Both are onmasterat34f72d11and neither is new — they reproduce with ordinary names.1. A lambda exports with no body
sympy.Lambda(x, )is aSyntaxError, so the generated file does not run. The body is simply not emitted.2. A set builder throws
Reporting it, as instructed. A
ConditionalSetreaches the exporter's domain switch with something the switch does not list; the natural export issympy.ConditionalSet(x, x > 0, S.Complexes)or aSetcomprehension.Both are the export layer only — the entities themselves are fine, print correctly, and round-trip through the parser.