[IronPython] Type analysis of expression
Christian Schmidt
christian2.schmidt at gmx.de
Sat Oct 24 23:22:40 CEST 2009
Hi Jeff,
>> I know that the return type of a dynamic expression cannot be determined
>> in general. But what would be a pragmatic way to guess the return type
>> of an expression?
>
> Can you give some examples of expressions you need to infer?
arithmetic operations: a + b / c
functions: sqrt(a)
logical expressions: a if (b or c) else d+e
I would also like to allow for enumerables in expressions:
sum(a)
sum([sqrt(x) for x in a if x>0])**2
More information about the Ironpython-users
mailing list