tests/string.py | raw changeset files shortlog |
1.1 --- a/tests/string.py Thu Dec 01 23:27:23 2016 +0100 1.2 +++ b/tests/string.py Thu Dec 01 23:48:24 2016 +0100 1.3 @@ -13,3 +13,10 @@ 1.4 1.5 print s[0] # H 1.6 print s[-1] # ! 1.7 + 1.8 +print ord(s[0]) # 72 1.9 + 1.10 +try: 1.11 + print ord(s) # should raise an exception 1.12 +except ValueError, exc: 1.13 + print "ord(s): value is not appropriate", exc.value