aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDamien George2014-03-24 11:49:32 +0000
committerDamien George2014-03-24 11:49:32 +0000
commita82d7ef29d80070323e1a2eec1451b6c6558ceb9 (patch)
tree02b5f9892e0cbcd848832f281a55562b26ae1506 /tests
parent0e9d96f18f10c3ac81f2d8c55ce6ea8b061e0f12 (diff)
parent4750a8398b62107753d684b18e9cf2534f5de155 (diff)
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/try-as-var.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/basics/try-as-var.py b/tests/basics/try-as-var.py
new file mode 100644
index 000000000..0a92f1cae
--- /dev/null
+++ b/tests/basics/try-as-var.py
@@ -0,0 +1,10 @@
+try:
+ raise ValueError(534)
+except ValueError as e:
+ print(repr(e))
+
+# Var bound in except block is automatically deleted
+try:
+ e
+except NameError:
+ print("NameError")