|
E9214 Python Self Parameter
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] E9214 Python Self ParameterA method or event has a parameter named selfGenerated Python methods name the object they are called on Example
// Python reserves self for the object a method is called on
generate Python;
class Shape {
Double scale(Double self) Python { return self * 2 }
}
Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears
// Any other parameter name works
generate Python;
class Shape {
Double scale(Double factor) Python { return factor * 2 }
}
Load the above code into UmpleOnline |