protected void generatePythonField ( SarlField field , PyAppendable it , IExtraLanguageGeneratorContext context ) { generateBlockComment ( getTypeBuilder ( ) . getDocumentation ( field ) , it ) ; if ( ! field . isStatic ( ) ) { it . append ( "self." ) ; //$NON-NLS-1$ } final String fieldName = it . declareUniqueNameVariable ( field , field . getName ( ) ) ; it . append ( fieldName ) ; it . append ( " = " ) ; //$NON-NLS-1$ if ( field . getInitialValue ( ) != null ) { generate ( field . getInitialValue ( ) , null , it , context ) ; } else { it . append ( PyExpressionGenerator . toDefaultValue ( field . getType ( ) ) ) ; } it . newLine ( ) ; }
Create a field declaration .