Skip to content

Commit fba5849

Browse files
committed
added an example to torture students
1 parent 8a71ec3 commit fba5849

5 files changed

Lines changed: 3763 additions & 3 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"code": "# Example to torture students\n# from UC Berkeley CS61a\n# (only works in Python 3)\n\ndef f(t):\n def g(t):\n def h():\n nonlocal t\n t += 1\n return h, lambda: t\n h, gt = g(0)\n return h, gt, lambda: t\n\nh, gt, ft = f(0)\nft(), gt()\nh()\nft(), gt()\n",
3+
"trace": [
4+
{
5+
"exception_msg": "SyntaxError: invalid syntax (<string>, line 8)",
6+
"line": 8,
7+
"event": "uncaught_exception",
8+
"offset": 22
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)