[pypy-svn] r25803 - pypy/dist/pypy/translator/goal
stephan at codespeak.net
stephan at codespeak.net
Thu Apr 13 17:17:22 CEST 2006
Author: stephan
Date: Thu Apr 13 17:17:20 2006
New Revision: 25803
Modified:
pypy/dist/pypy/translator/goal/targetrdicttest.py
Log:
added a third case to targetrdicttest which shows a strange behaviour:
when catching a general 'Exception' and printing it with 'str(e)', the former
KeyError suddenly turns into a <TypeError object>.
Modified: pypy/dist/pypy/translator/goal/targetrdicttest.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetrdicttest.py (original)
+++ pypy/dist/pypy/translator/goal/targetrdicttest.py Thu Apr 13 17:17:20 2006
@@ -45,6 +45,13 @@
else:
os.write(1,'\tno exception\n')
+ os.write(1,'test 3: getitem with unhashable key: (and catching general Exception)\n')
+ try:
+ mydict[uhobj]
+ except Exception, e:
+ os.write(1,'\t' + str(e) + '\n')
+ else:
+ os.write(1,'\tno exception\n')
# The Following can't be translated (for reasons I don't understand:
# it has to do with the assignment.
#
More information about the Pypy-commit
mailing list