Casting in Python

Because C# is a strongly typed language you have to specify the type for every variable. That’s why it needs casting to a LocationCurve. Python on the other hand does the casting for you, so in this case you should be able to do something like this:
curve = l.Curve

Because you ask for .Curve property on a Location object Python will figure out that it needs to cast to LocationCurve and then return the Curve.

1 Like