// Public Methods public void Emit(PySourceCodeEmiter emiter, PySourceCodeWriter writer, PyEmitStyle style) { var c = ConstValue; if (IsStatic && c == null) { c = PyConstValue.DefaultForType(_valueType); } if (c == null) { return; } if (!IsStatic) { throw new Exception( "Only static fields with initialization are allowed. Move instance field initialization to constructior."); } ScanForDangerousCode(ConstValue); writer.WriteLn(Name + " = " + c.GetPyCode(style)); }