|
W9212 Python No Python Code
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] W9212 Python No Python CodeCode has versions only for other languagesA method, action, entry, exit or do activity, or code injection has code only for languages other than Python (for example a Java body), and no untagged code. The Python generator has no code to use for it, so it leaves it out of the generated Python and this warning names it. Add a Python version, or untagged code, if the Python classes need that behaviour. Example
// describe has a Java body only, so the generated Python
// leaves it out and W9212 names it
generate Python;
class Book {
title;
String describe() Java { return "Book " + getTitle(); }
}
Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears
// With a Python body the method is generated for Python too
generate Python;
class Book {
title;
String describe() Java { return "Book " + getTitle(); }
Python { return "Book " + self.getTitle() }
}
Load the above code into UmpleOnline |