浏览代码

add Python example

Michael Bolin 5 年之前
父节点
当前提交
b5033530fb
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      src/app.ts

+ 9 - 1
src/app.ts

@@ -51,7 +51,7 @@ abstract final class ClassDefWithLotsOfKeywords {
 </body>
 </html>
 `,
-  javascript: `
+  javascript: `\
 const React = require('react');
 
 function create() {
@@ -61,6 +61,14 @@ function create() {
     </div>
   );
 }
+`,
+  python: `\
+import foo
+
+async def bar(): string:
+  f = await foo()
+  f_string = f"Hooray {f}! format strings are not supported in current Monarch grammar"
+  return foo_string
 `,
 };