[IronPython] Empty CodeMethodReturnStatement causes exception...

Nathan Baulch nathan.baulch at gmail.com
Tue Sep 12 10:05:53 CEST 2006


I also encountered this same problem in the Boo programming language.
To fix it, the developers have updated the code to output "return" by
itself when CodeMethodReturnStatement.Expression is null.

Would this same behaviour make sense in IronPython?

On 07/09/06, Nathan Baulch <nathan.baulch at gmail.com> wrote:
> I'm completely new to Python, so please forgive my ignorance.
> I thought a good way to learn would be to target it with my code
> generation tool that uses CodeDom. However I'm getting an exception
> when my code contains empty return statements
> (CodeMethodReturnStatement) for methods that return void.
>
> Is this a bug or does it not make sense to return void in Python?
> Is there a way around this without breaking other languages?
>
> Cheers,
> Nathan
>



More information about the Ironpython-users mailing list