Re: Inconsistent return values
I'm relatively new to ironpython and trying to understand my options for returning values back to my C# app. Can someone explain why option 1 returns fine, but option 2 returns null. Trying to allow my web app users to code up some "formulas" (basic logic) and this seems like a great option, but I need to understand "the rules". The responses will be sometimes text and sometimes numeric so wrapping in json.dumps seems like a good plan.
On 27 Oct, 2020, at 01:27, Markus Schaber <email@example.com> wrote:Frankly it looks like a bug to me. Statements have a value, although it is often None, the value of if/else should be the value of the last statement in the executed branch.
As a workaround, you may try:
res = json.dumps("true!!!")
res = json.dumps("false!!!”)
Deanna, you may get a more decisive response on the Gitter chat, which is more active than this mailing list.