I don't know if this is a simple matter of RTFM, but bear with me as it was a while ago I used a statically typed language...
I'm porting some C# code to IronPython, and I just stumbled on this statement below. I'm not at liberty to post the actual code, so I'll write it in pseudo code instead:
data_type_1 variable_1 = variable_2 as data_type_2;
where
variable_2 is a COM object from earlier parts of the code, variable_1 is a new variable, and data_type_1 is a class that interacts with the data in the COM object.
What does it mean? I'm guessing it is some form of conversion. How can I convert it to something IronPython can make sense of?
After killing a few hours I figured I might as well do it the simple but perhaps not the prettiest way. I simply downloaded Visual C# 2010 Express (free version) and wrote a minimal Class Library containing one method consisting of only the troublesome statement. I then built the dll, which was promptly imported and used in the original IronPython script.
From idea to a working solution it only took 10 minutes. Kudos to Microsoft, it was a whole lot simpler to build a dll than I thought.
How can I translate this C# variable declaration to something IronPython can handle?